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