[svn-commits] mjordan: testsuite/asterisk/trunk r3900 - in /asterisk/trunk: ./ lib/python/a...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Jul 12 07:48:36 CDT 2013


Author: mjordan
Date: Fri Jul 12 07:48:27 2013
New Revision: 3900

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=3900
Log:
Allow the Asterisk Test Suite to run outside of an Asterisk source directory

For a host of historical reasons, the Asterisk Test Suite used to have to run as a
subdirectory inside of the Asterisk source.

This actually hasn't been needed for quite some time. The last hold out *was* the
buildoptions library; however, as it turns out, buildoptions will check the installed
Asterisk headers for the build options it needs to execute.

This patch removes the checks and updates the README. It also makes the buildoptions
library raise an Exception if it couldn't find the header - this really is needed, as
certain build options (such as TEST_FRAMEWORK) are needed for a large number of tests to
execute.

Review: https://reviewboard.asterisk.org/r/2659

Modified:
    asterisk/trunk/README.txt
    asterisk/trunk/lib/python/asterisk/buildoptions.py
    asterisk/trunk/runtests.py

Modified: asterisk/trunk/README.txt
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/README.txt?view=diff&rev=3900&r1=3899&r2=3900
==============================================================================
--- asterisk/trunk/README.txt (original)
+++ asterisk/trunk/README.txt Fri Jul 12 07:48:27 2013
@@ -183,8 +183,7 @@
     $ ./configure && make
     $ make install
 
-Check out the test suite inside of the Asterisk source tree.  In this case, we
-will have the testsuite directory inside of the asterisk-trunk directory.
+Check out the test suite:
     $ svn co http://svn.digium.com/svn/testsuite/asterisk/trunk testsuite
     $ cd testsuite
 
@@ -202,8 +201,6 @@
 For more syntax information:
     $ ./runtests.py --help
 
-
-
 As an alternative to the above, you can use run-local:
 
 Get the Asterisk source tree you want to test:
@@ -213,8 +210,7 @@
 Optionally configure and make it:
     $ ./configure && make
 
-Check out the test suite inside of the Asterisk source tree.  In this case, we
-will have the testsuite directory inside of the asterisk-trunk directory.
+Check out the test suite:
     $ svn co http://svn.digium.com/svn/testsuite/asterisk/trunk testsuite
     $ cd testsuite
 

Modified: asterisk/trunk/lib/python/asterisk/buildoptions.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/lib/python/asterisk/buildoptions.py?view=diff&rev=3900&r1=3899&r2=3900
==============================================================================
--- asterisk/trunk/lib/python/asterisk/buildoptions.py (original)
+++ asterisk/trunk/lib/python/asterisk/buildoptions.py Fri Jul 12 07:48:27 2013
@@ -41,7 +41,7 @@
         for p in buildopts_hdr_paths:
             if (self.__parse_buildopts_file(p)):
                 return
-        print "Failed to open any build options files"
+        raise Exception("Failed to open any build options files")
 
 
     def __parse_buildopts_file(self, path):

Modified: asterisk/trunk/runtests.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/runtests.py?view=diff&rev=3900&r1=3899&r2=3900
==============================================================================
--- asterisk/trunk/runtests.py (original)
+++ asterisk/trunk/runtests.py Fri Jul 12 07:48:27 2013
@@ -398,19 +398,6 @@
             help="List available tags")
     (options, args) = parser.parse_args(argv)
 
-    # Check to see if this has been executed within a sub directory of an
-    # Asterisk source tree.  This is required so that we can execute
-    # install and uninstall targets of the Asterisk Makefile in between
-    # tests.
-    if os.path.exists("../main/asterisk.c") is False:
-        print "***  ERROR  ***\n" \
-              "runtests has not been executed from within a\n" \
-              "subdirectory of an Asterisk source tree.  This\n" \
-              "is required for being able to uninstall and install\n" \
-              "Asterisk in between tests.\n" \
-              "***************\n"
-        return 1
-
     ast_version = AsteriskVersion(options.version)
 
     # Ensure that there's a trailing '/' in the test specified with -t




More information about the svn-commits mailing list