build/pymake/tests/subprocess-path.mk

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 #T gmake skip
     2 #T grep-for: "2f7cdd0b-7277-48c1-beaf-56cb0dbacb24"
     4 ifdef __WIN32__
     5 PS:=;
     6 else
     7 PS:=:
     8 endif
    10 export PATH := $(TESTPATH)/pathdir$(PS)$(PATH)
    12 # Test two commands. The first one shouldn't go through the shell and the
    13 # second one should. The pathdir subdirectory has a Windows executable called
    14 # pathtest.exe and a shell script called pathtest. We don't care which one is
    15 # run, just that one of the two is (we use a uuid + grep-for to make sure
    16 # that happens).
    17 #
    18 # FAQ:
    19 # Q. Why skip GNU Make?
    20 # A. Because $(TESTPATH) is a Windows-style path, and MSYS make doesn't take
    21 #    too kindly to Windows paths in the PATH environment variable.
    22 #
    23 # Q. Why use an exe and not a batch file?
    24 # A. The use cases here were all exe files without the extension. Batch file
    25 #    lookup has broken semantics if the .bat extension isn't passed.
    26 #
    27 # Q. Why are the commands silent?
    28 # A. So that we don't pass the grep-for test by mistake.
    29 all:
    30 	@pathtest
    31 	@pathtest | grep -q 2f7cdd0b-7277-48c1-beaf-56cb0dbacb24
    32 	@echo TEST-PASS

mercurial