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
Add testing whitelist #143
Conversation
a012494
to
4cdcc9e
Compare
tests/tap.sh
Outdated
${output}.err; then | ||
# grep to skip test if backend chooses to whitelist test | ||
if grep -F -q -e 'Backend does not support' ${output}.err \ | ||
&& grep -F -q -e "$1 $backend" tests/whitelist ; then |
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 think it is a safer policy to force backends to explicitly list what functions they do not support so we don't get false passes from the test suite
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.
Could we make this something that a backend implements instead of residing in a common whitelist (that will need to be edited and merged)? One solution would be for the backend to implement the function that it "does not support", but raise an error with a different syntax to indicate that it is intentional.
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.
How about this change, backends add "backend does not implement..."? If we like it I can squash the two commits.
tests/whitelist
Outdated
t202-elemrestriction-f /gpu/occa | ||
t202-elemrestriction-f /omp/occa | ||
t202-elemrestriction-f /ocl/occa | ||
t202-elemrestriction-f /gpu/magma |
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 am listing the Fortran and C tests separately. I did it this way because we have had trouble with the Fortran tests not being the same as the C tests and certain backends not playing nice over Fortran.
tests/tap.sh
Outdated
@@ -53,15 +53,15 @@ for ((i=0;i<${#backends[@]}; ++i)); do | |||
|
|||
# grep to pass test t103 on error | |||
if grep -F -q -e 'Cannot grant CeedVector array access, the access lock is already in use' \ | |||
${output}.err; then | |||
${output}.err && [[ "$1" = "t103"* ]] ; then |
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 explicitly added this check so we don't get false positives on other tests.
7d67262
to
ddc8744
Compare
This fails in Travis but passes with OCCA libocca/occa@527494c |
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 assume we want SKIPs to be tallied.
backends/magma/ceed-magma.c
Outdated
CeedMemType mtype, | ||
CeedCopyMode cmode, | ||
const CeedInt *indices) { | ||
return CeedError(r->ceed, 1, "Backend does not impliment blocked restrictions"); |
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.
spelling
tests/tap.sh
Outdated
printf "ok $i0 # SKIP $1 $backend\n" | ||
printf "ok $i1 # SKIP $1 $backend stdout\n" | ||
printf "ok $i2 # SKIP $1 $backend stderr\n" | ||
printf "ok $i0 # OCCA SKIP $1 $backend\n" |
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 believe TAP says the SKIP
must come first.
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.
Correct, fixed
ddc8744
to
5724b82
Compare
Huh, I had thought TAP already tallied skips, but I guess not |
Perl might have intentionally moved away from explicitly listing the number of skipped tests in the summary result: Currently, Perl will output the number of |
5724b82
to
c750d1e
Compare
tests/tap.sh
Outdated
if grep -F -q -e 'Backend does not implement' \ | ||
${output}.err ; then | ||
printf "ok $i0 # TODO - not implemented $1 $backend\n" | ||
printf "ok $i1 # TODO - not implemented $1 $backend stdout\n" |
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.
Specification says TODO should be marked not ok
. I don't have a problem with prove's behavior, but I think we should try to follow the standard when using directives. There are other TAP consumers including Jenkins, which we might use to get CI on GPU or other DOE hardware/software stacks.
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 mixed it up; I thought TODO was another type of conditional pass. Fixed now.
c750d1e
to
48fecdc
Compare
Explicitly check for t103 or t104 for expected fail
48fecdc
to
4cc6aec
Compare
Codecov Report
@@ Coverage Diff @@
## master #143 +/- ##
==========================================
- Coverage 90.68% 90.64% -0.05%
==========================================
Files 77 77
Lines 3931 3934 +3
==========================================
+ Hits 3565 3566 +1
- Misses 366 368 +2
Continue to review full report at Codecov.
|
Code coverage went down because lines that return an error code that gets the test listed as skipped are not counted as covered. Otherwise this build passes. |
We aren't slaves to the coverage overlords. |
I wanted to at least set as a norm that we acknowledge and understand why coverage goes down and then we can overrule the codecov check if it makes sense. |
This adds a testing whitelist to make backend developers explicitly list which tests they will not support