aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-11-22 15:14:37 -0800
committerAlon Zakai <alonzakai@gmail.com>2011-11-22 15:14:37 -0800
commit28291b514b9133aa77bc153e983043d20d28c9c9 (patch)
tree32399b0c044c2cc1ce0418b0f4c55065c1d7129d /tests
parentdaa28da286655690a392958f604c3aeef4acd841 (diff)
improve build process for benchmarks, allowing more pass customization
Diffstat (limited to 'tests')
-rw-r--r--tests/runner.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/runner.py b/tests/runner.py
index c1743e39..8c098207 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -4517,7 +4517,7 @@ else:
#JS_ENGINE = V8_ENGINE
Building.COMPILER_TEST_OPTS = []
- POST_OPTIMIZATIONS = ['eliminator', 'closure', 'js-optimizer']
+ POST_OPTIMIZATIONS = ['eliminator', 'closure', ['js-optimizer', 'unGlobalize', 'removeAssignsToUndefined']]
TEST_REPS = 10
TOTAL_TESTS = 6
@@ -4578,6 +4578,10 @@ else:
final_filename = filename + '.o.js'
for post in POST_OPTIMIZATIONS:
+ post_args = []
+ if type(post) == list:
+ post_args = post[1:]
+ post = post[0]
if post == 'closure':
# Something like this (adjust memory as needed):
# java -Xmx1024m -jar CLOSURE_COMPILER --compilation_level ADVANCED_OPTIMIZATIONS --variable_map_output_file src.cpp.o.js.vars --js src.cpp.o.js --js_output_file src.cpp.o.cc.js
@@ -4601,7 +4605,7 @@ else:
f.close()
elif post == 'js-optimizer':
input = open(final_filename, 'r').read()
- output = Popen([NODE_JS, JS_OPTIMIZER], stdin=PIPE, stdout=PIPE).communicate(input)[0]
+ output = Popen([NODE_JS, JS_OPTIMIZER] + post_args, stdin=PIPE, stdout=PIPE).communicate(input)[0]
final_filename += '.jo.js'
f = open(final_filename, 'w')
f.write(output)