[Asterisk-code-review] CI: Add teardownRealtime (asterisk[master])

Jenkins2 asteriskteam at digium.com
Tue Jul 17 06:34:09 CDT 2018


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/9469 )

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(-)

Approvals:
  Jenkins2: Looks good to me, approved; Approved for Submit



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/9469
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I2fe55c38607eaec2fbf69ef23a5019e0c443a64b
Gerrit-Change-Number: 9469
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180717/8d7562d5/attachment.html>


More information about the asterisk-code-review mailing list