[asterisk-commits] russell: testsuite/asterisk/trunk r252 - /asterisk/trunk/runtests.py
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Apr 23 17:21:07 CDT 2010
Author: russell
Date: Fri Apr 23 17:21:03 2010
New Revision: 252
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=252
Log:
Detect if run-test is not executable and don't blow up
Modified:
asterisk/trunk/runtests.py
Modified: asterisk/trunk/runtests.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/runtests.py?view=diff&rev=252&r1=251&r2=252
==============================================================================
--- asterisk/trunk/runtests.py (original)
+++ asterisk/trunk/runtests.py Fri Apr 23 17:21:03 2010
@@ -86,7 +86,7 @@
"tests/%s/run-test" % self.test_name,
"-v", str(self.ast_version)
]
- if os.path.exists(cmd[0]):
+ if os.path.exists(cmd[0]) and os.access(cmd[0], os.X_OK):
print "Running %s ..." % cmd
p = subprocess.Popen(cmd, stdout=subprocess.PIPE)
p2 = subprocess.Popen(["tee", "tests/%s/test-output.txt" %
@@ -94,6 +94,8 @@
p.wait()
p2.wait()
self.passed = p.returncode == 0
+ else:
+ print "FAILED TO EXECUTE %s, it must exist and be executable" % cmd
self.time = time.time() - start_time
def __process_testinfo(self):
More information about the asterisk-commits
mailing list