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

fix(test-harness): hax-engine-names-extract needs hax in PATH #628

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

W95Psp
Copy link
Collaborator

@W95Psp W95Psp commented Apr 24, 2024

This commit fixes the test harness: since
#428, the test harness silently assumes hax is in PATH while building the crate
hax-engine-names-extract.

This crate hax-engine-names-extract is used at build time by the engine to list and import the Rust names we rely on.

hax-engine-names-extract itself requires the Rust part of hax at build time.

This PR fixes the test harness so that:

  1. it asks cargo to build cargo-hax and the driver
  2. it looks for the path of cargo-hax & driver just built (somewhere local in target/bin/something/someting), injects thoses paths as env vars in a cargo build --bin hax-engine-names-extract;
  3. it compiles the engine with the three paths mentioned above (which are required by the engine at compile time);
  4. it runs full hax (frontend + engine) on the actual tests;
  5. compare with snapshots.

Tagging @Nadrieril who found that bug, thanks!

@W95Psp W95Psp requested a review from franziskuskiefer April 24, 2024 16:04
@W95Psp W95Psp force-pushed the fix-test-harness-for-new-name-crate branch from 9d46aee to 76d794e Compare April 25, 2024 14:27
This commit fixes the test harness: since
#428, the test harness silently
assumes hax is in PATH while building the crate
`hax-engine-names-extract`.

This crate `hax-engine-names-extract` is used at build time by the
engine to list and import the Rust names we rely on.

`hax-engine-names-extract` itself requires the Rust part of hax at
build time.

This PR fixes the test harness so that:
 1. it asks cargo to build `cargo-hax` and the driver
 2. it looks for the path of `cargo-hax` & driver just built (somewhere local in `target/bin/something/someting`), injects thoses paths as env vars in a `cargo build --bin hax-engine-names-extract`;
 3. it compiles the engine with the three paths mentioned above (which are required by the engine at compile time);
 4. it runs full hax (frontend + engine) on the actual tests;
 5. compare with snapshots.
@W95Psp W95Psp force-pushed the fix-test-harness-for-new-name-crate branch from 76d794e to a03c1b4 Compare April 25, 2024 14:29
@W95Psp W95Psp added this pull request to the merge queue Apr 25, 2024
Merged via the queue into main with commit 996a929 Apr 25, 2024
11 checks passed
@W95Psp W95Psp deleted the fix-test-harness-for-new-name-crate branch April 25, 2024 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants