Skip to content

Commit

Permalink
Revert "Show a clear error on -o pointing to an invalid directory. fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
VirtualTim authored May 23, 2019
1 parent e5ab7bc commit cb5a6ce
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
7 changes: 0 additions & 7 deletions emcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,13 +712,6 @@ def uniquename(name):
# specified_target is the user-specified one, target is what we will generate
if specified_target:
target = specified_target
# check for the existence of the output directory now, to avoid having
# to do so repeatedly when each of the various output files (.mem, .wasm,
# etc) are written. This gives a more useful error message than the
# IOError and python backtrace that users would otherwise see.
dirname = os.path.dirname(target)
if dirname and not os.path.isdir(dirname):
exit_with_error("specified output file (%s) is in a directory that does not exist" % target)
else:
target = 'a.out.js'

Expand Down
4 changes: 0 additions & 4 deletions tests/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -7847,10 +7847,6 @@ def test_invalid_mem(self):
ret = self.expect_fail([PYTHON, EMCC, path_from_root('tests', 'hello_world.c'), '-s', 'WASM_MEM_MAX=33MB+1'])
self.assertContained('WASM_MEM_MAX must be a multiple of 64KB', ret)

def test_invalid_output_dir(self):
ret = self.expect_fail([PYTHON, EMCC, path_from_root('tests', 'hello_world.c'), '-o', os.path.join('NONEXISTING_DIRECTORY', 'out.js')])
self.assertContained('specified output file (NONEXISTING_DIRECTORY%sout.js) is in a directory that does not exist' % os.path.sep, ret)

@unittest.skipIf(SPIDERMONKEY_ENGINE not in JS_ENGINES, 'cannot run without spidermonkey')
def test_binaryen_ctors(self):
# ctor order must be identical to js builds, deterministically
Expand Down

0 comments on commit cb5a6ce

Please sign in to comment.