Browse Source

Replace "if $(MAKE) then false" by "! $(MAKE)"

Jean-Sébastien Pédron 9 years ago
parent
commit
6f6d7696e5
4 changed files with 12 additions and 12 deletions
  1. 2 2
      test/Makefile
  2. 1 1
      test/core_app.mk
  3. 5 5
      test/core_deps.mk
  4. 4 4
      test/core_upgrade.mk

+ 2 - 2
test/Makefile

@@ -348,7 +348,7 @@ ct: app1
 		"all() -> [testcase1]." \
 		"testcase1(_) -> 42 = m:succ(1)." \
 	 > app1/test/failing_SUITE.erl
-	$t if $(MAKE) -C app1 ct-failing $v ; then false ; fi
+	$t ! $(MAKE) -C app1 ct-failing $v
 	$i "Checking that '$(MAKE) distclean-ct' deletes logs."
 	$t $(MAKE) -C app1 distclean-ct $v
 	$t [ ! -e app1/logs ]
@@ -396,7 +396,7 @@ eunit: app1
 		"	?assertEqual(42, t:succ(1))." \
 		> app1/eunit/t_tests.erl
 	$t $(MAKE) -C app1 distclean TEST_DIR=eunit $v
-	$t if $(MAKE) -C app1 eunit TEST_DIR=eunit $v ; then false ; fi
+	$t ! $(MAKE) -C app1 eunit TEST_DIR=eunit $v
 	$t rm -rf app1/eunit app1/src/t.erl app1/test-eunit.log
 	$i "Test 'eunit' passed."
 

+ 1 - 1
test/core_app.mk

@@ -300,7 +300,7 @@ core-app-error: build clean-core-app-error
 	$t echo "-module(girl)." > $(APP)/src/girl.erl
 
 	$i "Check that trying to build returns non-zero"
-	$t if $(MAKE) -C $(APP) $v; then false; fi
+	$t ! $(MAKE) -C $(APP) $v
 
 core-app-generate-erl: build clean-core-app-generate-erl
 

+ 5 - 5
test/core_deps.mk

@@ -121,7 +121,7 @@ core-deps-apps-conflict: build clean-core-deps-apps-conflict
 	$t $(MAKE) -C $(APP) new-lib in=cowlib $v
 
 	$i "Check that building the application fails because of a conflict"
-	$t if $(MAKE) -C $(APP) $v; then false; fi
+	$t ! $(MAKE) -C $(APP) $v
 
 	$i "Check that Cowlib wasn't fetched"
 	$t test ! -e $(APP)/deps/cowlib
@@ -140,7 +140,7 @@ core-deps-apps-deep-conflict: build clean-core-deps-apps-deep-conflict
 	$t $(MAKE) -C $(APP) new-lib in=cowlib $v
 
 	$i "Check that building the application fails because of a conflict"
-	$t if $(MAKE) -C $(APP) $v; then false; fi
+	$t ! $(MAKE) -C $(APP) $v
 
 	$i "Check that Cowlib wasn't fetched"
 	$t test ! -e $(APP)/deps/cowlib
@@ -658,7 +658,7 @@ core-deps-fetch-fail-bad: build clean-core-deps-fetch-fail-bad
 	$t perl -ni.bak -e 'print;if ($$.==1) {print "DEPS = cowlib\ndep_cowlib = oops https://github.com/ninenines/cowlib 1.0.0\n"}' $(APP)/Makefile
 
 	$i "Check that building the application fails"
-	$t if $(MAKE) -C $(APP) $v; then false; fi
+	$t ! $(MAKE) -C $(APP) $v
 
 core-deps-fetch-fail-unknown: build clean-core-deps-fetch-fail-unknown
 
@@ -671,7 +671,7 @@ core-deps-fetch-fail-unknown: build clean-core-deps-fetch-fail-unknown
 	$t perl -ni.bak -e 'print;if ($$.==1) {print "DEPS = unknown\n"}' $(APP)/Makefile
 
 	$i "Check that building the application fails"
-	$t if $(MAKE) -C $(APP) $v; then false; fi
+	$t ! $(MAKE) -C $(APP) $v
 
 core-deps-fetch-git: build clean-core-deps-fetch-git
 
@@ -776,7 +776,7 @@ core-deps-fetch-legacy: build clean-core-deps-fetch-legacy
 	$t perl -ni.bak -e 'print;if ($$.==1) {print "DEPS = cowlib\ndep_cowlib = https://github.com/ninenines/cowlib 1.0.0\n"}' $(APP)/Makefile
 
 	$i "Check that building the application fails"
-	$t if $(MAKE) -C $(APP) $v; then false; fi
+	$t ! $(MAKE) -C $(APP) $v
 
 	$i "Check that building the application works with IS_DEP=1"
 	$t $(MAKE) -C $(APP) IS_DEP=1 $v

+ 4 - 4
test/core_upgrade.mk

@@ -34,7 +34,7 @@ core-upgrade-custom-build-dir: build clean-core-upgrade-custom-build-dir
 	$t ERLANG_MK_BUILD_DIR=custom $(MAKE) -C $(APP) erlang-mk $v
 
 	$i "Check that the rule is gone"
-	$t if $(MAKE) -C $(APP) erlang_mk_upgrade_test_rule $v; then false; fi
+	$t ! $(MAKE) -C $(APP) erlang_mk_upgrade_test_rule $v
 
 	$i "Check that the custom build directory is gone"
 	$t test ! -d $(APP)/custom/
@@ -53,7 +53,7 @@ core-upgrade-custom-config: build clean-core-upgrade-custom-config
 	$t $(MAKE) -C $(APP) erlang-mk $v
 
 	$i "Check that the bootstrap plugin is gone"
-	$t if $(MAKE) -C $(APP) list-templates $v; then false; fi
+	$t ! $(MAKE) -C $(APP) list-templates $v
 
 core-upgrade-custom-repo: build clean-core-upgrade-custom-repo
 
@@ -97,7 +97,7 @@ core-upgrade-no-config: build clean-core-upgrade-no-config
 	$t $(MAKE) -C $(APP) erlang-mk $v
 
 	$i "Check that the rule is gone"
-	$t if $(MAKE) -C $(APP) erlang_mk_upgrade_test_rule $v; then false; fi
+	$t ! $(MAKE) -C $(APP) erlang_mk_upgrade_test_rule $v
 
 core-upgrade-renamed-config: build clean-core-upgrade-renamed-config
 
@@ -116,4 +116,4 @@ core-upgrade-renamed-config: build clean-core-upgrade-renamed-config
 	$t $(MAKE) -C $(APP) erlang-mk $v
 
 	$i "Check that the bootstrap plugin is gone"
-	$t if $(MAKE) -C $(APP) list-templates $v; then false; fi
+	$t ! $(MAKE) -C $(APP) list-templates $v