-
Notifications
You must be signed in to change notification settings - Fork 44
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
Split writeback tests #498
Conversation
etc/sequencer_solo.out
Outdated
@@ -0,0 +1,4 @@ | |||
TESTING writeback_success_state with pubber opts: noWriteback |
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 would turn this into an in/out file, that is also the input to the testing, e.g.:
TEST writeback_success_state noWriteback RESULT fail writeback_success_state timeout waiting for point filter_differential_pressure_setpoint to have value_state applied
as one line could automatically be parsed to extract the first part so it's not replicated in the test script
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.
Changed as requested
bin/test_sequencer_solo
Outdated
SEQUENCER_OUT=/tmp/sequencer.log | ||
TEST_LIST=/tmp/solo_sequencer_tests.txt | ||
|
||
cat > $TEST_LIST <<EOF |
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.
as per other comment, I think this should be parsed out of the in/out file, not as a separate list maintained here
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.
Changed to read the tests from the "golden file"
bin/test_sequencer_solo
Outdated
@@ -0,0 +1,54 @@ | |||
#!/bin/bash -e |
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'd prefer a name like "test_itemized" or something to 1) avoid the test_sequencer prefix, and then 2) something a bit more descriptive than _solo.
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.
renamed to test_itemized
bin/test_itemized
Outdated
PROJECT_ID=$1 | ||
shift 1 | ||
|
||
REGEX="^TEST ([a-z_]+)([A-Za-z ]+)?(RESULT .*)?$" |
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.
What's this used for? I don't see it anywhere in the file... ??
Split writeback test into:
writeback_success_apply
can the device update the value of a point through writebackwriteback_success_state
can the device update the value of a point through writeback and sets thevalue_state
toapplied
writeback_invalid_state
does the device reportinvalid
in a pointsvalue_state
when the value is known to be invalidwriteback_failure_state
does the device reportfailure
in a pointsvalue_state
when the value is known to be invalidAlso add a utility
bin/test_sequencer_solo
to test a single sequence test against a pubber instance with given options (to test failures or edge cases .. similar to the one DAQ had). For some reason this works locally, but in CI it goes through the first line (irrespective of how many lines the file has) .. haven't figured that bit out