Skip to content

Commit

Permalink
Support subdirectories of test/js-api in build.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ms2ger committed Oct 12, 2018
1 parent fc7f006 commit 2baa839
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,12 @@ def build_js(out_js_dir, include_harness=False):
convert_wast_to_js(out_js_dir)

print('Copying JS tests to the JS out dir...')
for js_file in glob.glob(os.path.join(JS_TESTS_DIR, '*.js')):
shutil.copy(js_file, out_js_dir)
for path in os.listdir(JS_TESTS_DIR):
abspath = os.path.join(JS_TESTS_DIR, js_file)
if os.path.isdir(abspath):
shutil.copytree(abspath, os.path.join(out_js_dir, path))
else:
shutil.copy(abspath, out_js_dir)

harness_dir = os.path.join(out_js_dir, 'harness')
ensure_empty_dir(harness_dir)
Expand Down

0 comments on commit 2baa839

Please sign in to comment.