Add restriction for unique test names#1422
Conversation
|
You can check how the error look like on Jenkins https://jenkins.mc-stan.org/blue/organizations/jenkins/Math%20Pipeline/detail/PR-1422/1/pipeline/ An example: |
|
This one is going to be a pain to review because this touches A LOT of files
The rest just rename tests. I tried to make some of the generic labels like MathMatrix more specific with at least MathMatrixRevScal or something along those lines. |
|
Also this will probably cause merge issues with @bob-carpenter's efforts on the test framework. I am also happy to hold off on this PR until that gets merged. |
# Conflicts: # test/unit/math/prim/mat/fun/log_determinant_ldlt_test.cpp # test/unit/math/prim/mat/fun/matrix_exp_pade_test.cpp # test/unit/math/prim/mat/fun/matrix_exp_test.cpp
# Conflicts: # test/unit/math/prim/mat/fun/matrix_exp_multiply_test.cpp # test/unit/math/prim/mat/fun/scale_matrix_exp_multiply_test.cpp # test/unit/math/rev/mat/fun/scale_matrix_exp_multiply_test.cpp
t4c1
left a comment
There was a problem hiding this comment.
This is mostly fine, just some nitpicking from me.
Co-Authored-By: Tadej Ciglarič <tadej.c@gmail.com>
Co-Authored-By: Tadej Ciglarič <tadej.c@gmail.com>
Co-Authored-By: Tadej Ciglarič <tadej.c@gmail.com>
Co-Authored-By: Tadej Ciglarič <tadej.c@gmail.com>
Co-Authored-By: Tadej Ciglarič <tadej.c@gmail.com>
|
Thanks for the python script comments! I think I addressed everything. |
|
There were some additional non-unique tests that were found after the merge. The push dismissed the review :/ |
# Conflicts: # test/unit/math/prim/mat/fun/inverse_test.cpp
|
(stat_comp_benchmarks/benchmarks/gp_pois_regr/gp_pois_regr.stan, 1.01) |
|
@rok-cesnovar, somehow the tests haven't passed. Can you kick this off again? Also, with this PR, has this been integrated into the continuous integration? |
|
Yeah, some upstream tests timeouted or something weird. Restarted now. These checks are part of runChecks.py that is run with make test-math-dependencies (https://github.com/stan-dev/math/blob/develop/Jenkinsfile#L131). Those are run in the first phases of a Jenkins tests. An example of what the check does on develop (develop when I started this PR to be exact) is given here: |
|
@serban-nicusor-toptal sorry to bother you again, this seems like a weird failure. It might be some issue I caused on this PR, but I am seeing no errors printed: https://jenkins.mc-stan.org/blue/organizations/jenkins/Math%20Pipeline/detail/PR-1422/33/pipeline Thanks! |
|
Fixed, was trying to run on the new windows machine. It was looking for an agent and it picked the new one because I didn't restrict it. |
|
(stat_comp_benchmarks/benchmarks/gp_pois_regr/gp_pois_regr.stan, 1.0) |
Summary
Fixes #1387
This PR adds the restriction of having unique names for
TEST()andTEST_F()across the entire test/unit folder. It does so by adding a check torunChecks.pythat looks for duplicates in alltest/unit/*_test.cppfiles.Developers can verify they have not introduced non-unique names by running
python runChecks.py.The first commit will be the python script only. That way we can see the errors on Jenkins to verify that it works OK there. Then I will merge the cleanup branch that fixes all the errors.
Tests
/
Side Effects
/
Checklist
Math issue Suggestion: enforce unique GoogleTest names #1387
Copyright holder: Rok Češnovar
the basic tests are passing
the code is written in idiomatic C++ and changes are documented in the doxygen
the new changes are tested