aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-03-19 17:10:36 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-03-19 17:10:36 -0700
commit2a6749efe217c907931ed9b675e163219eaae377 (patch)
tree6654048d42349d1f2728c184fb62592e627d07a3
parentf9ef501d57001cce03abe7ed24dcd57e1c421888 (diff)
fix test_emcc_multifile
-rwxr-xr-xemcc6
-rwxr-xr-xtests/runner.py2
2 files changed, 5 insertions, 3 deletions
diff --git a/emcc b/emcc
index 398d5825..69dd999e 100755
--- a/emcc
+++ b/emcc
@@ -810,14 +810,14 @@ try:
code = ''
# Expand directories into individual files
- def add(filename, dirname, names, mode):
+ def add(mode, dirname, names):
for name in names:
combined = os.path.join(dirname, name)
- data_files.append({ 'name': newargs[i+1], 'mode': mode })
+ data_files.append({ 'name': os.path.join(dirname, name), 'mode': mode })
for file_ in data_files:
if os.path.isdir(file_['name']):
- os.path.walk(file_['name'], add, file_['name'], )
+ os.path.walk(file_['name'], add, file_['mode'])
data_files = filter(lambda file_: not os.path.isdir(file_['name']), data_files)
for file_ in data_files:
diff --git a/tests/runner.py b/tests/runner.py
index 5f06d255..9dc7ab32 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -6301,6 +6301,8 @@ f.close()
Popen([EMCC, os.path.join(self.get_dir(), 'main.cpp'), '--preload-file', 'subdirr/data1.txt', '--preload-file', 'subdirr/data2.txt', '-o', 'page.html']).communicate()
self.run_browser('page.html', 'You should see two cool numbers', '/report_result?1')
+ os.remove('page.html')
+
# by directory
Popen([EMCC, os.path.join(self.get_dir(), 'main.cpp'), '--preload-file', 'subdirr', '-o', 'page.html']).communicate()
self.run_browser('page.html', 'You should see two cool numbers', '/report_result?1')