aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-02-09 17:49:43 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-02-09 17:49:43 -0800
commitd239790152d4f8836585518712ae1fd68f06dfa5 (patch)
tree6055287f0e26ea44ccbad5dbcb42517b91a71f23
parent65bbb50870a52f8fa0fa90d14050ad8f21c338d8 (diff)
enforce strict order in multiple libraries generated in the test runner: the order does matter
-rwxr-xr-xtests/runner.py4
-rw-r--r--tools/shared.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/runner.py b/tests/runner.py
index a76fbaca..ecd5082f 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -261,10 +261,10 @@ process(sys.argv[1])
if cache and self.library_cache.get(cache_name):
print >> sys.stderr, '<load build from cache> ',
generated_libs = []
- for basename in self.library_cache[cache_name]:
+ for basename, contents in self.library_cache[cache_name]:
bc_file = os.path.join(build_dir, basename)
f = open(bc_file, 'wb')
- f.write(self.library_cache[cache_name][basename])
+ f.write(contents)
f.close()
generated_libs.append(bc_file)
return generated_libs
diff --git a/tools/shared.py b/tools/shared.py
index 9882cd7f..d830627c 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -452,10 +452,10 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)''' \
Building.make(make + make_args, stdout=open(os.path.join(project_dir, 'make_'), 'w'),
stderr=open(os.path.join(project_dir, 'make_err'), 'w'), env=env)
if cache is not None:
- cache[cache_name] = {}
+ cache[cache_name] = []
for f in generated_libs:
basename = os.path.basename(f)
- cache[cache_name][basename] = open(f, 'rb').read()
+ cache[cache_name].append((basename, open(f, 'rb').read()))
if old_dir:
os.chdir(old_dir)
return generated_libs