[Asterisk-code-review] CI: Add teardownRealtime (asterisk[13])
George Joseph
asteriskteam at digium.com
Tue Jul 17 04:03:17 CDT 2018
George Joseph has uploaded this change for review. ( https://gerrit.asterisk.org/9470
Change subject: CI: Add teardownRealtime
......................................................................
CI: Add teardownRealtime
Change-Id: I2fe55c38607eaec2fbf69ef23a5019e0c443a64b
---
M tests/CI/runTestsuite.sh
M tests/CI/setupRealtime.sh
A tests/CI/teardownRealtime.sh
3 files changed, 13 insertions(+), 1 deletion(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/70/9470/1
diff --git a/tests/CI/runTestsuite.sh b/tests/CI/runTestsuite.sh
index 35f4d58..9261308 100755
--- a/tests/CI/runTestsuite.sh
+++ b/tests/CI/runTestsuite.sh
@@ -16,6 +16,10 @@
echo "Running tests ${TEST_COMMAND}"
./runtests.py --cleanup ${TEST_COMMAND} | contrib/scripts/pretty_print --no-color --no-timer --term-width=120 --show-errors || :
+if [ $REALTIME -eq 0 ] ; then
+ $CIDIR/teardownRealtime.sh
+fi
+
if [ -f core* ] ; then
echo "*** Found a core file after running unit tests ***"
/var/lib/asterisk/scripts/ast_coredumper --no-default-search core*
diff --git a/tests/CI/setupRealtime.sh b/tests/CI/setupRealtime.sh
index 01593a1..f599d33 100755
--- a/tests/CI/setupRealtime.sh
+++ b/tests/CI/setupRealtime.sh
@@ -4,7 +4,9 @@
set -e
-cat >test-config.yaml <<EOF
+cp test-config.yaml test-config.orig.yaml
+
+cat >test-config.yaml <<-EOF
global-settings:
test-configuration: config-realtime
diff --git a/tests/CI/teardownRealtime.sh b/tests/CI/teardownRealtime.sh
new file mode 100755
index 0000000..1114699
--- /dev/null
+++ b/tests/CI/teardownRealtime.sh
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+CIDIR=$(dirname $(readlink -fn $0))
+source $CIDIR/ci.functions
+
+cp test-config.orig.yaml test-config.yaml
+psql --username=asterisk --host=localhost --db=asterisk --command='DROP OWNED BY asterisk CASCADE'
--
To view, visit https://gerrit.asterisk.org/9470
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2fe55c38607eaec2fbf69ef23a5019e0c443a64b
Gerrit-Change-Number: 9470
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180717/79ef65fe/attachment-0001.html>
More information about the asterisk-code-review
mailing list