diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-11 08:21:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-11 08:21:29 +0000 |
commit | 29cd838eab01ed7110f3ccb2e8c6a35c8a31dbcc (patch) | |
tree | 63ef546b10a81d461e5cf5ed9e98a68cd7dee1aa /src/kmk/tests/scripts/targets/DELETE_ON_ERROR | |
parent | Initial commit. (diff) | |
download | kbuild-29cd838eab01ed7110f3ccb2e8c6a35c8a31dbcc.tar.xz kbuild-29cd838eab01ed7110f3ccb2e8c6a35c8a31dbcc.zip |
Adding upstream version 1:0.1.9998svn3589+dfsg.upstream/1%0.1.9998svn3589+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/kmk/tests/scripts/targets/DELETE_ON_ERROR | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/kmk/tests/scripts/targets/DELETE_ON_ERROR b/src/kmk/tests/scripts/targets/DELETE_ON_ERROR new file mode 100644 index 0000000..f0d9f9b --- /dev/null +++ b/src/kmk/tests/scripts/targets/DELETE_ON_ERROR @@ -0,0 +1,22 @@ +#! -*-perl-*- + +$description = "Test the behaviour of the .DELETE_ON_ERROR target."; + +$details = ""; + +run_make_test(' +.DELETE_ON_ERROR: +all: ; exit 1 > $@ +', + '', "exit 1 > all\n#MAKE#: *** [#MAKEFILE#:3: all] Error 1\n#MAKE#: *** Deleting file 'all'", 512); + +run_make_test(' +.DELETE_ON_ERROR: +all: foo.x ; +%.x : %.q ; echo > $@ +%.q : ; exit 1 > $@ +', + '', "exit 1 > foo.q\n#MAKE#: *** [#MAKEFILE#:5: foo.q] Error 1\n#MAKE#: *** Deleting file 'foo.q'", 512); + +# This tells the test driver that the perl test script executed properly. +1; |