Skip to content

Commit 51e2b8c

Browse files
authoredDec 12, 2019
Revert "Don't set NODE_PATH during testing (#10001)" (#10024)
This reverts commit 9b53263.
1 parent 2fe4315 commit 51e2b8c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed
 

‎tests/runner.py

+3
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,9 @@ def setUp(self):
450450
self.working_dir = tempfile.mkdtemp(prefix='emscripten_test_' + self.__class__.__name__ + '_', dir=self.temp_dir)
451451
os.chdir(self.working_dir)
452452

453+
# Use emscripten root for node module lookup
454+
os.environ['NODE_PATH'] = path_from_root('node_modules')
455+
453456
if not self.save_dir:
454457
self.has_prev_ll = False
455458
for temp_file in os.listdir(TEMP_DIR):

‎tools/scons/site_scons/site_tools/emscripten/emscripten.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def generate(env, emscripten_path=None, **kw):
2525
'EMCC_AUTODEBUG', 'EMMAKEN_JUST_CONFIGURE_RECURSE', 'CONFIGURE_CC',
2626
'EMMAKEN_COMPILER', 'EMMAKEN_CFLAGS', 'EMCC_JSOPT_BLACKLIST',
2727
'MOZ_DISABLE_AUTO_SAFE_MODE', 'EMCC_STDERR_FILE',
28-
'EMSCRIPTEN_SUPPRESS_USAGE_WARNING', 'EM_SAVE_DIR', 'EMCC_JSOPT_MIN_CHUNK_SIZE',
28+
'EMSCRIPTEN_SUPPRESS_USAGE_WARNING', 'EM_SAVE_DIR', 'NODE_PATH', 'EMCC_JSOPT_MIN_CHUNK_SIZE',
2929
'EMCC_JSOPT_MAX_CHUNK_SIZE', 'EMCC_SAVE_OPT_TEMP', 'EMCC_CORES', 'EMCC_NO_OPT_SORT',
3030
'EMCC_BUILD_DIR', 'EM_POPEN_WORKAROUND', 'EMCC_DEBUG_SAVE', 'EMCC_SKIP_SANITY_CHECK',
3131
'EMMAKEN_NO_SDK', 'EM_PKG_CONFIG_PATH', 'EMCC_CLOSURE_ARGS', 'JAVA_HEAP_SIZE',

0 commit comments

Comments
 (0)
Please sign in to comment.