Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | ## $(TOUCH) and $(RM) are native commands in pymake. |
michael@0 | 2 | ## Test that pymake --just-print just prints them. |
michael@0 | 3 | |
michael@0 | 4 | ifndef TOUCH |
michael@0 | 5 | TOUCH = touch |
michael@0 | 6 | endif |
michael@0 | 7 | |
michael@0 | 8 | all: |
michael@0 | 9 | $(RM) justprint-native-file1.txt |
michael@0 | 10 | $(TOUCH) justprint-native-file2.txt |
michael@0 | 11 | $(MAKE) --just-print -f $(TESTPATH)/justprint-native.mk justprint_target > justprint.log |
michael@0 | 12 | # make --just-print shouldn't have actually done anything. |
michael@0 | 13 | test ! -f justprint-native-file1.txt |
michael@0 | 14 | test -f justprint-native-file2.txt |
michael@0 | 15 | # but it should have printed each command |
michael@0 | 16 | grep -q 'touch justprint-native-file1.txt' justprint.log |
michael@0 | 17 | grep -q 'rm -f justprint-native-file2.txt' justprint.log |
michael@0 | 18 | grep -q 'this string is "unlikely to appear in the log by chance"' justprint.log |
michael@0 | 19 | # tidy up |
michael@0 | 20 | $(RM) justprint-native-file2.txt |
michael@0 | 21 | @echo TEST-PASS |
michael@0 | 22 | |
michael@0 | 23 | justprint_target: |
michael@0 | 24 | $(TOUCH) justprint-native-file1.txt |
michael@0 | 25 | $(RM) justprint-native-file2.txt |
michael@0 | 26 | this string is "unlikely to appear in the log by chance" |
michael@0 | 27 | |
michael@0 | 28 | .PHONY: justprint_target |