Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MB-100: testrunner doesn't handle SyntaxError

test passed

Traceback (most recent call last):
  File "./testrunner", line 315, in <module>
    suite = unittest.TestLoader().loadTestsFromName(name)
  File "/usr/lib64/python2.6/unittest.py", line 575, in loadTestsFromName
    module = __import__('.'.join(parts_copy))
  File "pytests/rebalance/rebalancein.py", line 349
    fragmentation_monitor.result()
                        ^
SyntaxError: invalid syntax
scripts/start_cluster_and_run_tests.sh: line 70:  4000 Terminated              COUCHBASE_NUM_VBUCKETS=64 MAX_COUCH_REPS_PER_DOC=64 XDCR_FAILURE_RESTART_INTERVAL=1 python ./cluster_run --nodes=$servers_count >&$wd/cluster_run.log  (wd: ~/jenkins/workspace/testrunner-gerrit-master/ns_server)
+ sudo killall -9 beam.smp epmd memcached python
memcached: no process killed
+ true
[testrunner-gerrit-master] $ /bin/sh -xe /tmp/hudson1253734917366543873.sh
Archiving artifacts
Notifying upstream projects of job completion
Finished: SUCCESS

Change-Id: Ib6c1a0d793512438ede1cc9df389e5ba0c731186
Reviewed-on: http://review.couchbase.org/24196
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Iryna Mironava <irynamironava@yandex.ru>
  • Loading branch information...
commit 2cc3d205e2125e74b3bb1c4cfc43025b82ef1864 1 parent 2c5e1f5
@andreibaranouski andreibaranouski authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 testrunner
View
6 testrunner
@@ -313,10 +313,14 @@ if __name__ == "__main__":
pprint(TestInputSingleton.input.test_params)
try:
suite = unittest.TestLoader().loadTestsFromName(name)
- except AttributeError as e:
+ except AttributeError, e:
print "Test {0} was not found: {1}".format(name, e)
result = unittest.TextTestRunner(verbosity=2)._makeResult()
result.errors = [(name, e.message)]
+ except SyntaxError, e:
+ print "SyntaxError in {0}: {1}".format(name, e)
+ result = unittest.TextTestRunner(verbosity=2)._makeResult()
+ result.errors = [(name, e.message)]
else:
result = unittest.TextTestRunner(verbosity=2).run(suite)
time_taken = time.time() - start_time
Please sign in to comment.
Something went wrong with that request. Please try again.