-
Notifications
You must be signed in to change notification settings - Fork 451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allows to run test on Windows #403
Conversation
@@ -30,6 +31,8 @@ | |||
|
|||
class RunTests(unittest.TestCase): | |||
def _runCommand(self, command, logPath, expectedExitCode = 0): | |||
if isWindows: | |||
command = command.replace('\'', '"').replace('\\', '/') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm surprised this is needed, shouldn't os.path.join
take care of this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, sorry, now I get it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
|
||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would os.path.join(".", "wasm")
work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One has .exe extension, the other doesn't.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, but that's not needed when used as a command, is it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.exe
instead of./wasm
to run tests on Windows\\
, which is the default separator on Windows'argument'
, it needs to use"argument"