From ce2023307dca21587e48e60b576b24f03aba7b3b Mon Sep 17 00:00:00 2001 From: Ian Chamberlain Date: Sat, 30 Sep 2023 09:15:05 -0400 Subject: [PATCH] Fix some small bugs / workarounds for CI --- .github/workflows/ci.yml | 10 +++++++++- ctru-rs/examples/hello-world.rs | 2 -- ctru-rs/src/services/romfs.rs | 2 ++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9bd4f8f..8c43d8a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,7 +70,15 @@ jobs: - name: Hide duplicated warnings from lint job run: echo "::remove-matcher owner=clippy::" - - name: Build and run lib and integration tests + # This needs to be done separately from running the tests to ensure the + # lib tests' .3dsx is built before the test is run (for romfs). We don't + # really have a good way to build the 3dsx in between the build + test, + # unless cargo-3ds actually runs them as separate commands. See + # https://github.com/rust3ds/cargo-3ds/issues/44 for more details + - name: Build lib and integration tests + run: cargo 3ds test --no-run --tests --package ctru-rs + + - name: Run lib and integration tests uses: ian-h-chamberlain/test-runner-3ds/run-tests@v1 with: args: --tests --package ctru-rs diff --git a/ctru-rs/examples/hello-world.rs b/ctru-rs/examples/hello-world.rs index 230d25a..1be0107 100644 --- a/ctru-rs/examples/hello-world.rs +++ b/ctru-rs/examples/hello-world.rs @@ -32,8 +32,6 @@ fn main() { String::from_utf8_lossy(&writer.into_inner().unwrap()) ); - dbg!(std::env::args()); - println!("\x1b[29;16HPress Start to exit"); // Main application loop. This checks whether the app is normally running in the foreground. diff --git a/ctru-rs/src/services/romfs.rs b/ctru-rs/src/services/romfs.rs index c1a9a57..fdf65d7 100644 --- a/ctru-rs/src/services/romfs.rs +++ b/ctru-rs/src/services/romfs.rs @@ -85,6 +85,8 @@ mod tests { use super::*; #[test] + // NOTE: this test only passes when run with a .3dsx, which for now requires separate build + // and run steps so the 3dsx is built before the runner looks for the executable fn romfs_counter() { let _romfs = RomFS::new().unwrap(); let value = *ROMFS_ACTIVE.lock().unwrap();