-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
xtask: add backward compability test #592
Conversation
bisected this down to PR #564 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I've left two comments. You add a bit of redundant code, but that's not a huge problem.
bors r+ |
592: xtask: add backward compability test r=Urhengulas a=japaric **UPDATE**: I have left the defmt-version as it is since we have not made a defmt 0.3.0 release. I have also tweaked the defmt-test to not exit with non-zero exit code and remove some test-specific logic from xtask. See individual commits messages for details. --- implements #506 (comment) closes #506 I tested this against c7b20d5 (I called that `defmt-version-3` locally) and found that a bitflags change broke the wire format. Not a big deal but I guess we should bump the version to 4? cc `@jonas-schievink` ``` console bitflags (dev) Error: malformed bitflags value string 'Flags::0::FLAG_0' ``` the other thing that I found out is that some of the snapshot test exit with non-zero code: ``` console defmt-test (dev) INFO (1/7) running `change_init_struct`... INFO (2/7) running `test_for_changed_init_struct`... INFO (3/7) running `assert_true`... INFO (4/7) running `assert_imported_max`... INFO (5/7) running `result`... INFO (6/7) running `should_error`... INFO (7/7) running `fail`... ERROR panicked at '`#[should_error]` test failed with outcome: Ok(this should have returned `Err`)' Timer with period zero, disabling ``` `cargo xtask test-snapshot` is not checking the exit code; it only looks at stdout so that non-zero exit code is not a problem for those tests. in the backcompat test we want to look for decoding errors, not at stdout, so I was using the exit code of `cargo run` but this `defmt-test` is problematic with that check. Co-authored-by: Jorge Aparicio <jorge.aparicio@ferrous-systems.com>
Build failed: |
ef0b9ca
to
96b90a4
Compare
had to bump the revision because defmt::println! broke the wire format (expected) |
Build succeeded: |
UPDATE: I have left the defmt-version as it is since we have not made a defmt 0.3.0 release. I have also tweaked the defmt-test to not exit with non-zero exit code and remove some test-specific logic from xtask. See individual commits messages for details.
implements #506 (comment)
closes #506
I tested this against c7b20d5 (I called that
defmt-version-3
locally) and found that a bitflags change broke the wire format. Not a big deal but I guess we should bump the version to 4? cc @jonas-schievinkthe other thing that I found out is that some of the snapshot test exit with non-zero code:
cargo xtask test-snapshot
is not checking the exit code; it only looks at stdout so that non-zero exit code is not a problem for those tests. in the backcompat test we want to look for decoding errors, not at stdout, so I was using the exit code ofcargo run
but thisdefmt-test
is problematic with that check.