Skip to content

Commit

Permalink
[test] Nicer error message for missing executable. (#953)
Browse files Browse the repository at this point in the history
Fixes issue #431.
  • Loading branch information
binji authored Jan 25, 2019
1 parent a2d1f4d commit 9136258
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/core/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@
outputDir = arguments.out
inputFiles = arguments.file if arguments.file else glob.glob(os.path.join(inputDir, "*.wast"))

if not os.path.exists(wasmCommand):
sys.stderr.write("""\
Error: The executable '%s' does not exist.
Provide the correct path with the '--wasm' flag.
""" % (wasmCommand))
parser.print_help()
sys.exit(1)


class RunTests(unittest.TestCase):
def _runCommand(self, command, logPath, expectedExitCode = 0):
Expand Down

0 comments on commit 9136258

Please sign in to comment.