[asterisk-commits] rmudgett: testsuite/bamboo/trunk r791 - /bamboo/trunk/bin/build-libpri.sh

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Sep 14 16:27:57 CDT 2010


Author: rmudgett
Date: Tue Sep 14 16:27:53 2010
New Revision: 791

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=791
Log:
Make libpri build script run rosetest.

Modified:
    bamboo/trunk/bin/build-libpri.sh   (contents, props changed)

Modified: bamboo/trunk/bin/build-libpri.sh
URL: http://svnview.digium.com/svn/testsuite/bamboo/trunk/bin/build-libpri.sh?view=diff&rev=791&r1=790&r2=791
==============================================================================
--- bamboo/trunk/bin/build-libpri.sh (original)
+++ bamboo/trunk/bin/build-libpri.sh Tue Sep 14 16:27:53 2010
@@ -1,13 +1,45 @@
 #!/bin/sh
 
 if which gmake ; then
-	MAKE=gmake
+    MAKE=gmake
 else
-	MAKE=make
+    MAKE=make
 fi
 
+RESULT_FILE=test-reports/libpri-report.xml
+
+# Compile libpri without optimization
+#${MAKE} LIBPRI_OPT=
 ${MAKE}
 ${MAKE} install
 
+${MAKE} rosetest
+
 mkdir -p test-reports
-# TODO: Run tests and put results in an XML file in the test-reports directory
+
+# Run the ROSE encode/decode unit tests.
+./rosetest > rosetest_results.txt 2> errors.txt
+
+# Report results
+cat errors.txt | grep -v "libpri version" > errs.txt
+if [ -s errs.txt ] ; then
+    # At least one ROSE encode/decode unit test failed.
+    echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > ${RESULT_FILE}
+    echo "<testsuite errors=\"0\" time=\"0\" tests=\"1\" name=\"LibpriTestSuite\">" >> ${RESULT_FILE}
+    echo "<testcase time=\"0\" name=\"rosetest\">" >> ${RESULT_FILE}
+    echo "<failure><![CDATA[" >> ${RESULT_FILE}
+    cat rosetest_results.txt >> ${RESULT_FILE}
+    echo "]]>" >> ${RESULT_FILE}
+    echo "</failure>" >> ${RESULT_FILE}
+    echo "</testcase>" >> ${RESULT_FILE}
+    echo "</testsuite>" >> ${RESULT_FILE}
+else
+    # Yay!  All unit tests passed.
+    echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > ${RESULT_FILE}
+    echo "<testsuite errors=\"0\" time=\"0\" tests=\"1\" name=\"LibpriTestSuite\">" >> ${RESULT_FILE}
+    echo "<testcase time=\"0\" name=\"rosetest\">" >> ${RESULT_FILE}
+    echo "</testcase>" >> ${RESULT_FILE}
+    echo "</testsuite>" >> ${RESULT_FILE}
+fi
+
+rm -rf errors.txt errs.txt

Propchange: bamboo/trunk/bin/build-libpri.sh
------------------------------------------------------------------------------
    svn:executable = *




More information about the asterisk-commits mailing list