aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-08-07 18:58:12 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-08-07 18:58:12 -0700
commitd3f9e7a47b70c5dfd402fe61a36281c8245e13fc (patch)
tree08c83d95687081c847903b795b8f854f2cf2f698 /tests
parent23ae110b4c1fd480f486d1833822054b498ca471 (diff)
ensure test runner cache names are valid filenames
Diffstat (limited to 'tests')
-rwxr-xr-xtests/runner.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 38d64033..54a7a340 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -16,7 +16,7 @@ so you may prefer to use fewer cores here.
'''
from subprocess import Popen, PIPE, STDOUT
-import os, unittest, tempfile, shutil, time, inspect, sys, math, glob, re, difflib, webbrowser, hashlib, threading, platform, BaseHTTPServer, multiprocessing, functools, stat
+import os, unittest, tempfile, shutil, time, inspect, sys, math, glob, re, difflib, webbrowser, hashlib, threading, platform, BaseHTTPServer, multiprocessing, functools, stat, string
if len(sys.argv) == 1:
print '''
@@ -355,6 +355,9 @@ process(sys.argv[1])
cache_name = name + str(Building.COMPILER_TEST_OPTS) + cache_name_extra + (self.env.get('EMCC_LLVM_TARGET') or '')
+ valid_chars = "_%s%s" % (string.ascii_letters, string.digits)
+ cache_name = ''.join([(c if c in valid_chars else '_') for c in cache_name])
+
if self.library_cache is not None:
if cache and self.library_cache.get(cache_name):
print >> sys.stderr, '<load %s from cache> ' % cache_name,