aboutsummaryrefslogtreecommitdiffstats
path: root/test/Makefile
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2015-12-29 00:13:04 +0100
committerLoïc Hoguin <[email protected]>2015-12-29 00:13:04 +0100
commit60e3b55fe07d087504a4e9f5c163d5cb75afbcfa (patch)
tree3c32854835a4279f36ac7f783ad79e385adb69f4 /test/Makefile
parent1ceffe2a00b9f329b14518cc5b64230acd956cdc (diff)
downloaderlang.mk-60e3b55fe07d087504a4e9f5c163d5cb75afbcfa.tar.gz
erlang.mk-60e3b55fe07d087504a4e9f5c163d5cb75afbcfa.tar.bz2
erlang.mk-60e3b55fe07d087504a4e9f5c163d5cb75afbcfa.zip
Add Common Test docs and tests
Also fixes issues with multi application repositories, and add support for running a specific group/case in a given test suite.
Diffstat (limited to 'test/Makefile')
-rw-r--r--test/Makefile40
1 files changed, 2 insertions, 38 deletions
diff --git a/test/Makefile b/test/Makefile
index f7ecf64..728d751 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -303,49 +303,13 @@ endef
# The following tests are slowly being converted.
# Do NOT use -j with legacy tests.
-.PHONY: legacy clean-legacy ct tests-cover docs
+.PHONY: legacy clean-legacy tests-cover docs
-legacy: clean-legacy ct tests-cover docs pkgs
+legacy: clean-legacy tests-cover docs pkgs
clean-legacy:
$t rm -rf app1
-ct: app1
- $i "ct: Testing ct and related targets."
- $i "Setting up test suite."
- $t mkdir -p app1/test
- $t printf "%s\n" \
- "-module(m_SUITE)." \
- "-export([all/0, testcase1/1])." \
- "all() -> [testcase1]." \
- "testcase1(_) -> 2 = m:succ(1)." \
- > app1/test/m_SUITE.erl
- $t $(MAKE) -C app1 ct $v
- $i "Checking files created by '$(MAKE) ct'."
- $t [ -e app1/test/m_SUITE.beam ]
- $t [ -e app1/ebin/m.beam ]
- $t [ -e app1/logs ]
- $i "Checking that '$(MAKE) clean' does not delete logs."
- $t $(MAKE) -C app1 clean $v
- $t [ -e app1/logs ]
- $i "Testing target 'ct-mysuite' where mysuite_SUITE is a test suite."
- $t $(MAKE) -C app1 ct-m $v
- $i "Checking that '$(MAKE) ct' returns non-zero for a failing suite."
- $t printf "%s\n" \
- "-module(failing_SUITE)." \
- "-export([all/0, testcase1/1])." \
- "all() -> [testcase1]." \
- "testcase1(_) -> 42 = m:succ(1)." \
- > app1/test/failing_SUITE.erl
- $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 ]
- $t [ -e app1/ebin/m.beam ]
- $i "Cleaning up test data."
- $t rm -rf app1/test
- $i "Test 'ct' passed."
-
# TODO: do coverage for 'tests' instead of 'eunit ct' when triq is fixed
tests-cover: app1
$i "tests-cover: Testing 'eunit' and 'ct' with COVER=1"