From aa6c060fca42d7a38f3b91cf334a3544f8346afa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Mon, 12 Oct 2015 15:34:45 +0200 Subject: Do not try to execute an empty shell script in core-plugins-one test The previous code did: if ``; 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. --- test/core_plugins.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/core_plugins.mk') 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 -- cgit v1.2.3