diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7f9cf4a..adcb03c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,6 +60,7 @@ jobs: - name: Build and run tests (unit + integration) uses: ./run-tests with: + working-directory: test-runner args: -- -v - name: Build and run doc tests @@ -71,6 +72,7 @@ jobs: RUSTDOCFLAGS: " --persist-doctests target/armv6k-nintendo-3ds/debug/doctests" uses: ./run-tests with: + working-directory: test-runner # TODO(#4): run them suckers args: --doc --no-run -- -v diff --git a/.dockerignore b/run-tests/.dockerignore similarity index 100% rename from .dockerignore rename to run-tests/.dockerignore diff --git a/Dockerfile b/run-tests/Dockerfile similarity index 100% rename from Dockerfile rename to run-tests/Dockerfile diff --git a/run-tests/action.yml b/run-tests/action.yml index b957bb4..08c46e4 100644 --- a/run-tests/action.yml +++ b/run-tests/action.yml @@ -16,6 +16,11 @@ inputs: required: false default: test-runner-3ds + working-directory: + description: Change to this directory before running tests. Defaults to $GITHUB_WORKSPACE + required: false + default: ${GITHUB_WORKSPACE} + runs: using: composite steps: @@ -25,6 +30,7 @@ runs: - name: Build test-runner image uses: docker/build-push-action@v4 with: + contest: ${{ github.action_path }} tags: ${{ inputs.runner-image }}:latest push: false load: true @@ -40,6 +46,7 @@ runs: # https://github.com/actions/runner/issues/2058, which also means # we have to export this instead of using the env: key run: | + cd ${{ inputs.working-directory }} export CARGO_TARGET_ARMV6K_NINTENDO_3DS_RUNNER=" docker run --rm -v /tmp:/tmp diff --git a/docker/download_citra.sh b/run-tests/docker/download_citra.sh similarity index 100% rename from docker/download_citra.sh rename to run-tests/docker/download_citra.sh diff --git a/docker/entrypoint.sh b/run-tests/docker/entrypoint.sh similarity index 100% rename from docker/entrypoint.sh rename to run-tests/docker/entrypoint.sh diff --git a/docker/sdl2-config.ini b/run-tests/docker/sdl2-config.ini similarity index 100% rename from docker/sdl2-config.ini rename to run-tests/docker/sdl2-config.ini diff --git a/docker/test-runner.gdb b/run-tests/docker/test-runner.gdb similarity index 100% rename from docker/test-runner.gdb rename to run-tests/docker/test-runner.gdb diff --git a/Cargo.toml b/test-runner/Cargo.toml similarity index 54% rename from Cargo.toml rename to test-runner/Cargo.toml index 6d49699..eddd1c3 100644 --- a/Cargo.toml +++ b/test-runner/Cargo.toml @@ -12,3 +12,10 @@ socket = [] ctru-rs = { git = "https://github.com/rust3ds/ctru-rs" } ctru-sys = { git = "https://github.com/rust3ds/ctru-rs" } libc = "0.2.147" + +[patch."https://github.com/ian-h-chamberlain/test-runner-3ds"] +test-runner = { path = "." } + +# Future-proofing for a rename + org move: +[patch."https://github.com/rust3ds/test-runner"] +test-runner = { path = "." } diff --git a/src/console.rs b/test-runner/src/console.rs similarity index 100% rename from src/console.rs rename to test-runner/src/console.rs diff --git a/src/gdb.rs b/test-runner/src/gdb.rs similarity index 100% rename from src/gdb.rs rename to test-runner/src/gdb.rs diff --git a/src/lib.rs b/test-runner/src/lib.rs similarity index 100% rename from src/lib.rs rename to test-runner/src/lib.rs diff --git a/src/socket.rs b/test-runner/src/socket.rs similarity index 100% rename from src/socket.rs rename to test-runner/src/socket.rs diff --git a/tests/integration.rs b/test-runner/tests/integration.rs similarity index 100% rename from tests/integration.rs rename to test-runner/tests/integration.rs