Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions scripts/test/binaryenjs.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# limitations under the License.

import os
import shutil
import subprocess

from . import shared
Expand All @@ -37,15 +36,10 @@ def make_js_test_header(binaryen_js):


def make_js_test(input_js_file, binaryen_js):
# Copy the binaryen.js file to binaryen.mjs for now since file
# extensions matter under node.
# TODO(sbc): Should binaryen build as a `.mjs` file itself?
shutil.copyfile(binaryen_js, 'binaryen.mjs')

basename = os.path.basename(input_js_file)
outname = os.path.splitext(basename)[0] + '.mjs'
with open(outname, 'w') as f:
f.write(make_js_test_header('./binaryen.mjs'))
f.write(make_js_test_header(binaryen_js))
test_src = open(input_js_file).read()
f.write(test_src)
return outname
Expand Down
Loading