aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/run-smoke-tests
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/run-smoke-tests')
-rwxr-xr-xscripts/run-smoke-tests23
1 files changed, 17 insertions, 6 deletions
diff --git a/scripts/run-smoke-tests b/scripts/run-smoke-tests
index c2333e7825..5a850c7107 100755
--- a/scripts/run-smoke-tests
+++ b/scripts/run-smoke-tests
@@ -1,10 +1,21 @@
#!/bin/bash
set -ev
-cd $ERL_TOP/release/tests/test_server
-$ERL_TOP/bin/erl -s ts install -s ts smoke_test batch -s init stop
-
-if grep -q '=failed *[1-9]' ct_run.test_server@*/*/run.*/suite.log; then
- echo "One or more tests failed."
- exit 1
+if [ -z "$ERL_TOP" ]; then
+ ERL_TOP=$(pwd)
fi
+
+function run_smoke_tests {
+ cd $ERL_TOP/release/tests/test_server
+ $ERL_TOP/bin/erl -s ts install -s ts smoke_test batch -s init stop
+
+ if grep -q '=failed *[1-9]' ct_run.test_server@*/*/run.*/suite.log; then
+ echo "One or more tests failed."
+ exit 1
+ fi
+ rm -rf ct_run.test_server@*
+}
+
+run_smoke_tests
+ERL_FLAGS="-smp disable" run_smoke_tests
+