source:
npl/phone/asterisk_testsuite/testsuite-nosourcecheck.patch
@
f33f781
Last change on this file since f33f781 was c5c522c, checked in by , 8 years ago | |
---|---|
|
|
File size: 2.3 KB |
-
runtests.py
old new import subprocess 13 13 import optparse 14 14 import time 15 15 import yaml 16 import string 16 17 17 18 sys.path.append("lib/python") 18 19 … … def main(argv=None): 295 296 parser.add_option("-l", "--list-tests", action="store_true", 296 297 dest="list_tests", default=False, 297 298 help="List tests instead of running them.") 299 parser.add_option("-n", "--no-asterisk-source", action="store_true", 300 dest="no_asterisk_source", default=False, 301 help="Test without asterisk source.") 298 302 (options, args) = parser.parse_args(argv) 299 303 300 # Check to see if this has been executed within a sub directory of an 301 # Asterisk source tree. This is required so that we can execute 302 # install and uninstall targets of the Asterisk Makefile in between 303 # tests. 304 if os.path.exists("../main/asterisk.c") is False: 305 print "*** ERROR ***\n" \ 306 "runtests has not been executed from within a\n" \ 307 "subdirectory of an Asterisk source tree. This\n" \ 308 "is required for being able to uninstall and install\n" \ 309 "Asterisk in between tests.\n" \ 310 "***************\n" 311 return 1 312 313 ast_version = AsteriskVersion() 304 if options.no_asterisk_source is False: 305 # Check to see if this has been executed within a sub directory of an 306 # Asterisk source tree. This is required so that we can execute 307 # install and uninstall targets of the Asterisk Makefile in between 308 # tests. 309 if os.path.exists("../main/asterisk.c") is False: 310 print "*** ERROR ***\n" \ 311 "runtests has not been executed from within a\n" \ 312 "subdirectory of an Asterisk source tree. This\n" \ 313 "is required for being able to uninstall and install\n" \ 314 "Asterisk in between tests.\n" \ 315 "***************\n" 316 return 1 317 318 ast_version = AsteriskVersion() 319 else: 320 #Check version from allready installed Asterisk. 321 ast_version = AsteriskVersion(string.split(os.popen("asterisk -V | cut -d ' ' -f 2 2> /dev/null ").read())[0]); 314 322 315 323 test_suite = TestSuite(ast_version) 316 324
Note: See TracBrowser
for help on using the repository browser.