Skip to content

Run rust unit tests (including doc tests)#2421

Merged
sporksmith merged 1 commit intoshadow:mainfrom
sporksmith:rust-tests
Sep 28, 2022
Merged

Run rust unit tests (including doc tests)#2421
sporksmith merged 1 commit intoshadow:mainfrom
sporksmith:rust-tests

Conversation

@sporksmith
Copy link
Copy Markdown
Contributor

Accidentally dropped running any rust unit tests in #2404

We were also previously not running doc tests, and I think not running tests for any crates for which we don't build a staticlib for C code to link to. (I'm not sure whether there were any such tests before, but there increasingly will be)

For simplicity and maintainability I just invoke cargo test now, instead of trying to directly run the test executables. While the cargo behavior of always rebuilding (if needed) may be slightly surprising, this approach should be more robust and maintainable.

@github-actions github-actions bot added Component: Build Build/install tools and dependencies Component: Main Composing the core Shadow executable labels Sep 28, 2022
@sporksmith sporksmith force-pushed the rust-tests branch 2 times, most recently from 487325e to 19536f5 Compare September 28, 2022 19:35
@sporksmith sporksmith marked this pull request as ready for review September 28, 2022 19:50
Accidentally dropped running any rust unit tests in
shadow#2404

We were also previously not running doc tests, and I think not running
tests for any crates for which we don't build a `staticlib` for C code
to link to. (I'm not sure whether there were any such tests before, but
there increasingly will be)

For simplicity and maintainability I just invoke `cargo test` now,
instead of trying to directly run the test executables. While the cargo
behavior of always rebuilding (if needed) may be slightly surprising,
this approach should be more robust and maintainable.
@sporksmith sporksmith enabled auto-merge (squash) September 28, 2022 20:18
@sporksmith sporksmith merged commit 79c471c into shadow:main Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Build Build/install tools and dependencies Component: Main Composing the core Shadow executable

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants