diff options
author | Jean-Sébastien Pédron <[email protected]> | 2015-10-12 15:34:45 +0200 |
---|---|---|
committer | Jean-Sébastien Pédron <[email protected]> | 2015-10-22 09:20:19 +0200 |
commit | aa6c060fca42d7a38f3b91cf334a3544f8346afa (patch) | |
tree | 2a98377fa588d911d7857ab8bf29a5de0e8bd0ba /test/core_plugins.mk | |
parent | d9c4a25dc182590703fbf55bc8d4ea6af8f7e834 (diff) | |
download | erlang.mk-aa6c060fca42d7a38f3b91cf334a3544f8346afa.tar.gz erlang.mk-aa6c060fca42d7a38f3b91cf334a3544f8346afa.tar.bz2 erlang.mk-aa6c060fca42d7a38f3b91cf334a3544f8346afa.zip |
Do not try to execute an empty shell script in core-plugins-one test
The previous code did:
if `<code that prints nothing on stdout>`; then ...
So the test failed but not for the good reason. The forked shell
printed:
/bin/sh: gmake[2]:: not found
Now, both "Run 'make ...'" tests are simplified and do not rely on
backticks and test(1) anymore. Either the output is inspected or the
exit code is checked.
Diffstat (limited to 'test/core_plugins.mk')
-rw-r--r-- | test/core_plugins.mk | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/core_plugins.mk b/test/core_plugins.mk index dfece5e..184c08f 100644 --- a/test/core_plugins.mk +++ b/test/core_plugins.mk @@ -72,7 +72,7 @@ core-plugins-one: build clean-core-plugins-one $t perl -ni.bak -e 'print;if ($$.==1) {print "DEPS = plugin_dep\ndep_plugin_dep = git file://$(abspath $(APP)/plugin_dep) master\nDEP_PLUGINS = plugin_dep/mk/plugin1.mk\n"}' $(APP)/Makefile $i "Run 'make plugin1' and check that it prints plugin1" - $t test -n "`$(MAKE) -C $(APP) plugin1 | grep plugin1`" + $t $(MAKE) --no-print-directory -C $(APP) plugin1 | grep -qw plugin1 $i "Run 'make plugin2' and confirm the target doesn't exist" - $t if `$(MAKE) -C $(APP) plugin2`; then false; fi + $t ! $(MAKE) --no-print-directory -C $(APP) plugin2 |