-
Notifications
You must be signed in to change notification settings - Fork 55
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
Remove unproven #131
Remove unproven #131
Conversation
A couple of bits I've realized while thinking about this PR:
|
tests/integration.rs
Outdated
assert_eq!(device_svd, device_svd_deserialized) | ||
} | ||
|
||
// fn diff_svds(orig: Path, dest: Path) -> Result<Diff> { |
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.
@MarcoIeni, Are you exploring https://github.com/MarcoIeni/delta for SVD diffing currently?
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.
no, I did some work on delta just for fun, not svd related reasons :P
Yes, we need to add |
Ouch, my fault for not doing a
Good, is that being worked on under some branch? |
No, as I know. You can see this also: |
Ah, good to see the integration tests there, I suspected this might not be the right place to put those, thanks for the pointer! Shall I remove the integration test from here and you merge this PR with just the |
1 think 3 PRs should be here:
|
Alright, backtracked on this PR so that it just fits point 1: remove unproven. Cheers! |
@@ -4,7 +4,7 @@ use svd_parser as svd; | |||
fn arm_sample_faulty() { | |||
let xml = include_str!(concat!( | |||
env!("CARGO_MANIFEST_DIR"), | |||
"/tests/ARM_Sample_faulty.svd" | |||
"/tests/data/ARM_Sample_faulty.svd" |
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.
you missed this I think
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.
You mean reverting it as it was? I think that this structure is more intuitive (keep tests and data separate)... it's a minimal change and tests keep passing as they were anyway?:
$ cargo test
(...)
running 1 test
test arm_sample_faulty ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
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.
Sorry, I haven't seen you moved the file!
@@ -2,4 +2,3 @@ | |||
[._]*.sw[a-p] | |||
Cargo.lock | |||
target | |||
tests/ |
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.
is there a reason why tests
directory was ignored?
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.
🤷🏻♂️ ... I guess that @burrbull was generating some files automatically and did not want to version them in the past? Can't see any reason to keep ignoring them now TBH, that's why I removed the dir from .gitignore
.
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.
It is not my repo initially :)
LGTM. Squash commits and modify changelog please. |
Just out of curiosity. Why should he squash commits? You can select the option "Squash and merge" from github. |
We use bors for tests and merging as I remember. |
you are right, thanks! |
bors r+ |
131: Remove unproven r=burrbull a=brainstorm Fixes #116 @MarcoIeni @burrbull Let's do what you suggest on #116, shall we? See the integration [test mostly borrowed from @MarcoIeni's `svd_parser`](https://github.com/rust-embedded/svd/pull/131/files#diff-eb771f54a1fdc1c330a82981d7d27d1202a5cbe3a59581ff67af5e3361f5f90e) Getting the following error for now, ~seems like getting the same capitalization (and perhaps ordering?) might be challenging for integration testing purposes~... nope, it's just `<fields />` being empty, I guess the SVD parser should tolerate that?: ```xml <peripheral> <name>RNG</name> <description>RNG register</description> <baseAddress>0x3FF20E44</baseAddress> <addressBlock> <offset>0</offset> <size>32</size> <usage>RNG register</usage> </addressBlock> <registers> <register> <name>rng</name> <fields /> <description>RNG register</description> <addressOffset>0</addressOffset> <size>32</size> <access>read-only</access> <resetValue>0</resetValue> </register> </registers> </peripheral> ``` ```rust ---- read_and_write stdout ---- thread 'read_and_write' panicked at 'Failed to parse the SVD file into Rust structs: In device `esp8266` Caused by: 0: In peripheral `RNG` 1: In register `rng` 2: Register have `fields` tag, but it is empty', tests/integration.rs:14:38 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` Co-authored-by: Roman Valls Guimera <[email protected]>
Build failed: |
Looks like |
See #132 |
bors r+ |
Build succeeded: |
You can configure bors to squash merge |
Yes, but I don't remember where, therealprof told me that sometimes they prefer to keep commit history, so they don't want to squash and merge everytime. |
Fixes #116
@MarcoIeni @burrbull Let's do what you suggest on #116, shall we? See the integration test mostly borrowed from @MarcoIeni's
svd_parser
Getting the following error for now,
seems like getting the same capitalization (and perhaps ordering?) might be challenging for integration testing purposes... nope, it's just<fields />
being empty, I guess the SVD parser should tolerate that?: