diff --git a/test/test_all.py b/test/test_all.py index b2f8f6b2b..9c408c0e9 100644 --- a/test/test_all.py +++ b/test/test_all.py @@ -26,13 +26,17 @@ def run_tests(critical_tests, other_tests): other_tests = reorder_tests(other_tests, last_failed) all_tests = critical_tests + other_tests + invocation_dir = os.getcwd() + for i in all_tests: print ("%-25s : " %(i)), try: __import__(i) except: print "FAILED" - open('test_results.txt', 'w').write(i) + f = open(os.path.join(invocation_dir, 'test_results.txt'), 'w') + f.write(i) + f.close() raise print "PASSED" # Erase the file on success diff --git a/v2/test/test_all.py b/v2/test/test_all.py index b2f8f6b2b..9c408c0e9 100644 --- a/v2/test/test_all.py +++ b/v2/test/test_all.py @@ -26,13 +26,17 @@ def run_tests(critical_tests, other_tests): other_tests = reorder_tests(other_tests, last_failed) all_tests = critical_tests + other_tests + invocation_dir = os.getcwd() + for i in all_tests: print ("%-25s : " %(i)), try: __import__(i) except: print "FAILED" - open('test_results.txt', 'w').write(i) + f = open(os.path.join(invocation_dir, 'test_results.txt'), 'w') + f.write(i) + f.close() raise print "PASSED" # Erase the file on success