-
Notifications
You must be signed in to change notification settings - Fork 32
Per-target rust testsuite #114
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
fc573cd
to
3e885d1
Compare
As in WebAssembly#112, we reorganize the directory structure and change to a python build script, with the goal of making space for wasip3. Before, it was: - tests/rust/: Root of cargo package - tests/rust/src: Rust source files - tests/rust/testsuite: JSON test files, fs-tests.dir; built .wasm files dumped here Now it is: - tests/rust/wasm32-wasip1: Root of cargo package for wasip1 builds - tests/rust/wasm32-wasip1/src: Rust source, but also JSON and fs-tests.dir - tests/rust/testsuite/: Removed; instead it is a built dir - tests/rust/testsuite/wasm32-wasip1: All wasm and json files copied here
3e885d1
to
e63e727
Compare
return f"{system}-{version}" | ||
|
||
def compute_build_target(system, version): | ||
if version == 'wasip3': |
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.
not sure why do we need this check? Looks like we never attempt to call this function for wasip3
def compute_build_target(system, version): | ||
if version == 'wasip3': | ||
# wasm32-wasip3 triple not yet supported. | ||
return compute_target(system, 'wasip2') |
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.
if wasm32-wasip3 is not supported, then we should throw an error, instead of using another version. But as I stated in my previous comment, we could perhaps remove this if
statement completely.
parser.add_argument("--dry-run", action="store_true") | ||
parser.add_argument("--verbose", action="store_true") | ||
parser.add_argument("--release", action="store_true") |
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.
Consider adding help
for each of those, not all the parameters are self-explanatory
return compute_target(system, 'wasip2') | ||
return compute_target(system, version) | ||
|
||
BASE_DIR = Path(__file__).parent |
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 could be a cli argument with the default value set to Path(__file__).parent
for local executions.
r = subprocess.run(argv) | ||
if r.returncode != 0: | ||
sys.exit(r.returncode) |
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.
This should have similar effect
r = subprocess.run(argv) | |
if r.returncode != 0: | |
sys.exit(r.returncode) | |
r = subprocess.run(argv, check=True) |
As in #112, we reorganize the directory structure and change to a python build script, with the goal of making space for wasip3.
Before, it was:
tests/rust/: Root of cargo package
tests/rust/src: Rust source files
tests/rust/testsuite: JSON test files, fs-tests.dir; built .wasm files dumped here
Now it is:
tests/rust/wasm32-wasip1: Root of cargo package for wasip1 builds
tests/rust/wasm32-wasip1/src: Rust source, but also JSON and fs-tests.dir
tests/rust/testsuite/: Removed; instead it is a built dir
tests/rust/testsuite/wasm32-wasip1: All wasm and json files copied here
Note, the workflows are not yet updated.