-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Isolate try-build tests from riscv-rt
- Loading branch information
1 parent
5e211cd
commit 274df75
Showing
33 changed files
with
85 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
merge_group: | ||
|
||
name: Run macro tests (tests) | ||
|
||
jobs: | ||
run-tests: | ||
strategy: | ||
matrix: | ||
os: [ macos-latest, ubuntu-latest ] # windows shows weird linking errors | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
- name: Run tests | ||
run: cargo test --package tests | ||
|
||
# Job to check that all the builds succeeded | ||
tests-check: | ||
needs: | ||
- run-tests | ||
runs-on: ubuntu-latest | ||
if: always() | ||
steps: | ||
- run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,5 @@ members = [ | |
"riscv-peripheral", | ||
"riscv-rt", | ||
"riscv-semihosting", | ||
"tests", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[package] | ||
name = "tests" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
riscv = { path = "../riscv", version = "0.12.0" } | ||
riscv-rt = { path = "../riscv-rt", version = "0.13.0" } | ||
trybuild = "1.0" |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...ui/core_interrupt/fail_empty_macro.stderr → ...rt/core_interrupt/fail_empty_macro.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
.../ui/core_interrupt/fail_signatures.stderr → ...-rt/core_interrupt/fail_signatures.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
error: `#[core_interrupt]` function must have signature `[unsafe] fn() [-> !]` | ||
--> tests/ui/core_interrupt/fail_signatures.rs:2:1 | ||
--> tests/riscv-rt/core_interrupt/fail_signatures.rs:2:1 | ||
| | ||
2 | fn my_interrupt(code: usize) {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: `#[core_interrupt]` function must have signature `[unsafe] fn() [-> !]` | ||
--> tests/ui/core_interrupt/fail_signatures.rs:5:1 | ||
--> tests/riscv-rt/core_interrupt/fail_signatures.rs:5:1 | ||
| | ||
5 | fn my_other_interrupt() -> usize {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: `#[core_interrupt]` function must have signature `[unsafe] fn() [-> !]` | ||
--> tests/ui/core_interrupt/fail_signatures.rs:8:1 | ||
--> tests/riscv-rt/core_interrupt/fail_signatures.rs:8:1 | ||
| | ||
8 | async fn my_async_interrupt() {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...ests/ui/exception/fail_empty_macro.stderr → ...iscv-rt/exception/fail_empty_macro.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
...tests/ui/exception/fail_signatures.stderr → ...riscv-rt/exception/fail_signatures.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
error: `#[exception]` function must have signature `[unsafe] fn([&[mut] riscv_rt::TrapFrame]) [-> !]` | ||
--> tests/ui/exception/fail_signatures.rs:2:1 | ||
--> tests/riscv-rt/exception/fail_signatures.rs:2:1 | ||
| | ||
2 | fn my_exception(code: usize) {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: `#[exception]` function must have signature `[unsafe] fn([&[mut] riscv_rt::TrapFrame]) [-> !]` | ||
--> tests/ui/exception/fail_signatures.rs:5:1 | ||
--> tests/riscv-rt/exception/fail_signatures.rs:5:1 | ||
| | ||
5 | fn my_other_exception(trap_frame: &riscv_rt::TrapFrame, code: usize) {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: `#[exception]` function must have signature `[unsafe] fn([&[mut] riscv_rt::TrapFrame]) [-> !]` | ||
--> tests/ui/exception/fail_signatures.rs:8:1 | ||
--> tests/riscv-rt/exception/fail_signatures.rs:8:1 | ||
| | ||
8 | async fn my_async_exception(trap_frame: &riscv_rt::TrapFrame, code: usize) {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...xternal_interrupt/fail_empty_macro.stderr → ...xternal_interrupt/fail_empty_macro.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
...external_interrupt/fail_signatures.stderr → ...external_interrupt/fail_signatures.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
error: `#[external_interrupt]` function must have signature `[unsafe] fn() [-> !]` | ||
--> tests/ui/external_interrupt/fail_signatures.rs:31:1 | ||
--> tests/riscv-rt/external_interrupt/fail_signatures.rs:31:1 | ||
| | ||
31 | fn my_interrupt() -> usize {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: `#[external_interrupt]` function must have signature `[unsafe] fn() [-> !]` | ||
--> tests/ui/external_interrupt/fail_signatures.rs:34:1 | ||
--> tests/riscv-rt/external_interrupt/fail_signatures.rs:34:1 | ||
| | ||
34 | fn my_other_interrupt(code: usize) -> usize {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: `#[external_interrupt]` function must have signature `[unsafe] fn() [-> !]` | ||
--> tests/ui/external_interrupt/fail_signatures.rs:37:1 | ||
--> tests/riscv-rt/external_interrupt/fail_signatures.rs:37:1 | ||
| | ||
37 | async fn my_async_interrupt(code: usize) -> usize {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#[test] | ||
fn riscv_rt() { | ||
let t = trybuild::TestCases::new(); | ||
t.compile_fail("tests/riscv-rt/*/fail_*.rs"); | ||
t.pass("tests/riscv-rt/*/pass_*.rs"); | ||
} |