Skip to content
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

Enable running wizard on mac for spectest #164

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ jobs:

echo "[INFO] Configuring the 'wizeng' interpreter..."
mkdir -p output/tests/interpreters
mv wizard-engine/bin/spectest.x86-linux output/tests/interpreters
mv wizard-engine/bin/spectest.x86-linux output/tests/interpreters/wizard-spectest

echo "[INFO] Testing the 'wizeng' interpreter configuration..."
ls -al output/tests/interpreters
./output/tests/interpreters/spectest.x86-linux --help || [ $? == 3 ]
./output/tests/interpreters/wizard-spectest --help || [ $? == 3 ]
- name: Setup Wasm Spec Reference Interpreter
run: |
echo "[INFO] Configuring OCaml..."
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ The supported interpreters are:
1. [Install OCaml](https://opam.ocaml.org/doc/Install.html)
2. Download [`progress`](https://github.com/titzer/progress) and ensure the `progress` binary is on your `PATH`
3. Download and build [`wizeng`](https://github.com/titzer/wizard-engine/blob/master/doc/Building.md)
- After running `make -j`, the binary `spectest.x86-linux` should be located at `wizard-engine/bin/spectest.x86-linux`
- After running `make -j`, the binaries `spectest.*` should be located at `wizard-engine/bin/spectest.*`
4. Build the Wasm reference interpreter through the Wizard repo, after running the below commands, the binary `wasm` should be located at `wizard-engine/test/wasm-spec/repos/spec/interpreter/wasm`
```bash
# Configure OCaml
Expand All @@ -61,7 +61,7 @@ The supported interpreters are:
```

The interpreter binaries must be runnable using the following commands (this can be done by placing symbolic links to the respective binaries):
1. For Wizard: `./output/tests/interpreters/spectest.x86-linux`
1. For Wizard: `./output/tests/interpreters/wizard-spectest`
2. For Wasm-Ref: `./output/tests/interpreters/wasm`

To run tests:
Expand Down
4 changes: 2 additions & 2 deletions src/wast/test_harness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ fn run_wast_test(inter: &String, args: &[String], wast_file_name: &String) -> Ou
}

const INT_PATH: &str = "./output/tests/interpreters";
const WIZENG_SPEC_INT: &str = "spectest.x86-linux";
const WIZENG_SPEC_INT: &str = "wizard-spectest";
const WASM_REF_INT: &str = "wasm";
fn get_available_interpreters() -> Vec<(String, Vec<String>)> {
let supported_interpreters = [
Expand All @@ -162,7 +162,7 @@ fn get_available_interpreters() -> Vec<(String, Vec<String>)> {

for (interpreter, args) in supported_interpreters.iter() {
let int_path = format!("{INT_PATH}/{interpreter}");
match Command::new(&int_path).arg("--help").output() {
match Command::new(&int_path).arg("-help").output() {
Err(..) => {
// do nothing
}
Expand Down