-
Notifications
You must be signed in to change notification settings - Fork 1.4k
swift test: Fix incorrect wasmkit
arguments
#9114
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
base: main
Are you sure you want to change the base?
Conversation
`wasmkit` expects executable arguments to be passed after `--` delimiter. Additionally, we need to bridge current directory to the host with the additional `--dir .` option. Fixes #9113
@swift-ci test |
@@ -966,6 +966,9 @@ final class TestRunner { | |||
args.append(runnerPath.pathString) | |||
args.append(contentsOf: runner.extraCLIOptions) | |||
args.append(testPath.relative(to: localFileSystem.currentWorkingDirectory!).pathString) | |||
if runner.path?.components.last == "wasmkit" { |
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.
Do we have a more robust way to check for WasmKit?
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 don't think so. Yes, it feels somewhat icky to check for a path component, but test runners from toolsets and Swift SDKs provide no other identification. Given that's all we have, why wouldn't we consider this simple and robust enough?
@swift-ci test |
No new tests were added, as impacted |
@swift-ci test windows |
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.
Although the PR has low LOC changes, could I ask that you add a test that will ensure we don't regress the behaviour added by this PR?
I've addressed that in the comment above, currently no new tests can be added, because none of the existing |
Can we add a test similar to the changes in #9085, more specifically where we inspect the command line arguments passed to the test runner? |
This requires no new tests, as mentioned above this was addressed for the existing test in 6023552 commit in this same PR.
No, this was discussed in of the older PRs that added relevant modifications to |
@@ -966,6 +966,9 @@ final class TestRunner { | |||
args.append(runnerPath.pathString) | |||
args.append(contentsOf: runner.extraCLIOptions) | |||
args.append(testPath.relative(to: localFileSystem.currentWorkingDirectory!).pathString) | |||
if runner.path?.components.last == "wasmkit" { | |||
args.append("--") |
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.
wasmkit expects executable arguments to be passed after -- delimiter.
That has been fixed by swiftwasm/WasmKit#175, and the fix has been shipped as 0.1.4. So if you're going to merge swiftlang/swift#80820, you don't need to add the --
delimiter.
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.
That's a great point, thanks!
@swift-ci test macos self hosted |
@swift-ci test linux |
wasmkit
expects executable arguments to be passed after--
delimiter. Additionally, we need to bridge current directory to the host with the additional--dir .
option.Fixed #9113