diff -r 000000000000 -r 6474c204b198 build/pymake/tests/justprint-native.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/build/pymake/tests/justprint-native.mk Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,28 @@ +## $(TOUCH) and $(RM) are native commands in pymake. +## Test that pymake --just-print just prints them. + +ifndef TOUCH +TOUCH = touch +endif + +all: + $(RM) justprint-native-file1.txt + $(TOUCH) justprint-native-file2.txt + $(MAKE) --just-print -f $(TESTPATH)/justprint-native.mk justprint_target > justprint.log +# make --just-print shouldn't have actually done anything. + test ! -f justprint-native-file1.txt + test -f justprint-native-file2.txt +# but it should have printed each command + grep -q 'touch justprint-native-file1.txt' justprint.log + grep -q 'rm -f justprint-native-file2.txt' justprint.log + grep -q 'this string is "unlikely to appear in the log by chance"' justprint.log +# tidy up + $(RM) justprint-native-file2.txt + @echo TEST-PASS + +justprint_target: + $(TOUCH) justprint-native-file1.txt + $(RM) justprint-native-file2.txt + this string is "unlikely to appear in the log by chance" + +.PHONY: justprint_target