Allows to run test on Windows#403
Conversation
interpreter/runtests.py
Outdated
| class RunTests(unittest.TestCase): | ||
| def _runCommand(self, command, logPath, expectedExitCode = 0): | ||
| if isWindows: | ||
| command = command.replace('\'', '"').replace('\\', '/') |
There was a problem hiding this comment.
I'm surprised this is needed, shouldn't os.path.join take care of this?
There was a problem hiding this comment.
Yeah the underlying problem is that the interpreter doesn't recognize \ in paths, but I wanted to make a quick fix for the time being, I might look into this later on.
There was a problem hiding this comment.
I think the problem was merely insufficient quotation in main.ml. I just pushed a quick fix:
Can you rebase and see whether that makes this line unnecessary? Then the isWindows flag might be unnecessary as well.
interpreter/runtests.py
Outdated
|
|
||
| parser = argparse.ArgumentParser() | ||
| parser.add_argument('--wasm', metavar='<wasm-command>', default='./wasm') | ||
| parser.add_argument('--wasm', metavar='<wasm-command>', default=('./wasm' if not isWindows else 'wasm.exe')) |
There was a problem hiding this comment.
Would os.path.join(".", "wasm") work?
There was a problem hiding this comment.
One has .exe extension, the other doesn't.
There was a problem hiding this comment.
Sure, but that's not needed when used as a command, is it?
There was a problem hiding this comment.
os.path.join('.', 'wasm') results in ./wasm even on Windows which is not valid.
However, I found that os.path.join(os.getcwd(), 'wasm') is a valid command
|
lgtm |
8c55f94 to
ddc3313
Compare
ddc3313 to
e6d3a1f
Compare
|
I was able to remove the |
|
I don't have merge rights on this repo, can someone merge this for me please? |
|
Thanks |
Make type setting of i8.pack and i16.pack less jarring
wasm.exeinstead of./wasmto run tests on Windows\\, which is the default separator on Windows'argument', it needs to use"argument"