diff options
author | Paul Smith <psmith@gnu.org> | 2014-05-01 09:48:10 -0400 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2014-05-01 09:51:04 -0400 |
commit | 0faa98a0bbf05d63f9385de9d66d1707257ab437 (patch) | |
tree | 3a8feb31a095d398bee36b8f5c62fd24707edf91 /tests | |
parent | 8411528fdd21e978076365df2f49e2b934becb84 (diff) | |
download | gunmake-0faa98a0bbf05d63f9385de9d66d1707257ab437.tar.gz |
[SV 42249] Propagate correct rule status results.
* remake.c (update_file, update_file_1, check_dep): Return an enum
update_status value instead of an int, and keep the highest value we
find as we walk the graph so that the ultimate status is correct.
* tests/scripts/options/dash-q: Add a test for updating prerequisites.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/scripts/options/dash-q | 44 |
1 files changed, 32 insertions, 12 deletions
diff --git a/tests/scripts/options/dash-q b/tests/scripts/options/dash-q index 56f04a1..194588d 100644 --- a/tests/scripts/options/dash-q +++ b/tests/scripts/options/dash-q @@ -5,21 +5,21 @@ $details = "Try various uses of -q and ensure they all give the correct results. # TEST 0 -run_make_test(' +run_make_test(qq! one: two: ; three: ; : -four: ; $(.XY) -five: ; \ - $(.XY) -six: ; \ - $(.XY) - $(.XY) -seven: ; \ - $(.XY) - : foo - $(.XY) -', +four: ; \$(.XY) +five: ; \\ + \$(.XY) +six: ; \\ + \$(.XY) +\t\$(.XY) +seven: ; \\ + \$(.XY) +\t: foo +\t\$(.XY) +!, '-q one', ''); # TEST 1 @@ -54,4 +54,24 @@ one:: ; @echo two ', '-q', '', 256); +# TEST 7 : Savannah bug # 42249 +# Make sure we exit with 1 even for prerequisite updates +run_make_test(' +build-stamp: ; echo $@ +build-arch: build-stamp +build-x: build-arch +build-y: build-x +', + '-q build-y', '', 256); + +# TEST 8 +# Make sure we exit with 2 on error even with -q +run_make_test(' +build-stamp: ; echo $@ +build-arch: build-stamp-2 +build-x: build-arch +build-y: build-x +', + '-q build-y', "#MAKE#: *** No rule to make target 'build-stamp-2', needed by 'build-arch'. Stop.\n", 512); + 1; |