diff options
author | Paul Smith <psmith@gnu.org> | 2009-06-10 02:21:09 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2009-06-10 02:21:09 +0000 |
commit | c8840352acf40443a70ea3748130cee055154492 (patch) | |
tree | 1e0ab35d58e13f763e42aa1171112ce0daf080f6 /tests/scripts | |
parent | d4ee0012925815e069dd9996241703a7e9bd0338 (diff) | |
download | gunmake-c8840352acf40443a70ea3748130cee055154492.tar.gz |
- Fix Savannah bug #19108
- Fix Savannah bug #17752
- Test suite:
* When tests fail keep a "run" file containing the command invoked.
* Support for the Valgrind "memcheck" and "massif" tools.
Diffstat (limited to 'tests/scripts')
-rw-r--r-- | tests/scripts/features/patternrules | 40 | ||||
-rw-r--r-- | tests/scripts/misc/general4 | 14 |
2 files changed, 35 insertions, 19 deletions
diff --git a/tests/scripts/features/patternrules b/tests/scripts/features/patternrules index 35f155a..c5bc3db 100644 --- a/tests/scripts/features/patternrules +++ b/tests/scripts/features/patternrules @@ -15,11 +15,13 @@ $dir =~ s,.*/([^/]+)$,../$1,; # to match properly. # -run_make_test(' +run_make_test(q! .PHONY: all all: case.1 case.2 case.3 -a: void + +# We can't have this, due to "Implicit Rule Search Algorithm" step 5c +#xxx: void # 1 - existing file %.1: void @@ -41,9 +43,7 @@ a: void @exit 0 3.implicit-phony: -', -'', -''); +!, '', ''); # TEST #1: make sure files that are built via implicit rules are marked # as targets (Savannah bug #12202). @@ -160,5 +160,35 @@ p1.% p2.%: %.orig ', '', "foo.s1\np1.foo\n"); +# TEST 6: Make sure that non-target files are still eligible to be created +# as part of implicit rule chaining. Savannah bug #17752. + +run_make_test(q! +BIN = xyz +COPY = $(BIN).cp +SRC = $(BIN).c +allbroken: $(COPY) $(BIN) ; @echo ok +$(SRC): ; @echo 'main(){}' > $@ +%.cp: % ; @cp $< $@ +% : %.c ; @cp $< $@ +clean: ; @rm -rf $(SRC) $(COPY) $(BIN) +!, + '', "ok\n"); + +unlink(qw(xyz xyz.cp xyz.c)); + +# TEST 7: Make sure that all prereqs of all "also_make" targets get created +# before any of the things that depend on any of them. Savannah bug #19108. + +run_make_test(q! +final: x ; @echo $@ +x: x.t1 x.t2 ; @echo $@ +x.t2: dep +dep: ; @echo $@ +%.t1 %.t2: ; @echo $*.t1 ; echo $*.t2 +!, + '', "dep\nx.t1\nx.t2\nx\nfinal\n"); + + # This tells the test driver that the perl test script executed properly. 1; diff --git a/tests/scripts/misc/general4 b/tests/scripts/misc/general4 index e67323b..6d42a16 100644 --- a/tests/scripts/misc/general4 +++ b/tests/scripts/misc/general4 @@ -28,20 +28,6 @@ cc foo.o -o foo'); unlink('foo.c'); -# Test other implicit rule searching - -&touch('bar'); -run_make_test(' -test.foo: -%.foo : baz ; @echo done $< -%.foo : bar ; @echo done $< -fox: baz -', - '', - 'done bar'); -unlink('bar'); - - # Test implicit rules with '$' in the name (see se_implicit) run_make_test(q! |