Skip to content
Snippets Groups Projects
Commit a6b4186e authored by Nicolas Noble's avatar Nicolas Noble
Browse files

Merge pull request #80 from ctiller/mac

Fix run_test.py so it runs the first time
parents 41325505 1cc11dbf
No related branches found
No related tags found
No related merge requests found
...@@ -5,6 +5,7 @@ import argparse ...@@ -5,6 +5,7 @@ import argparse
import glob import glob
import itertools import itertools
import multiprocessing import multiprocessing
import os
import sys import sys
import time import time
...@@ -117,9 +118,10 @@ class TestCache(object): ...@@ -117,9 +118,10 @@ class TestCache(object):
with open('.run_tests_cache', 'w') as f: with open('.run_tests_cache', 'w') as f:
f.write(simplejson.dumps(self.dump())) f.write(simplejson.dumps(self.dump()))
def load(self): def maybe_load(self):
with open('.run_tests_cache') as f: if os.path.exists('.run_tests_cache'):
self.parse(simplejson.loads(f.read())) with open('.run_tests_cache') as f:
self.parse(simplejson.loads(f.read()))
def _build_and_run(check_cancelled, newline_on_success, cache): def _build_and_run(check_cancelled, newline_on_success, cache):
...@@ -158,7 +160,7 @@ test_cache = (None if runs_per_test != 1 ...@@ -158,7 +160,7 @@ test_cache = (None if runs_per_test != 1
or 'valgrind' in build_configs or 'valgrind' in build_configs
else TestCache()) else TestCache())
if test_cache: if test_cache:
test_cache.load() test_cache.maybe_load()
if forever: if forever:
success = True success = True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment