Skip to content

Conversation

blegat
Copy link
Member

@blegat blegat commented Apr 19, 2019

The idea is to be able to run subsets of the tests easily.
So if you just want to test utilities, you just do

$ julia test/Utilities/Utilities.jl

and if you just want to test the caching optimizer, you can do

$ julia test/Utilities/caching_optimizer.jl

The second important aspect is that we would like to have several testsets when we do that so that we have information about the progress of the tests.
If it runs for a few seconds and then just says

$ julia test/Utilities/caching_optimizer.jl
Test Summary:     | Pass  Total
Caching Optimizer |  109    109

then it's not helpful.
For this reason, inside test/Utilities/caching_optimizer.jl, there is a few test sets and in test/Utilities/Utilities.jl, we have

@testset "Caching Optimizer" begin
    include("caching_optimizer.jl")
end

so that if we run test/Utilities/caching_optimizer.jl we see each sub-testsets and if we run the whole test/Utilities/Utilities.jl, we just get Caching Optimizer and if we run the whole runtests.jl, we just have Utilities.

@blegat blegat force-pushed the bl/improve_tests branch from 489e936 to 3955c2f Compare April 26, 2019 16:29
@blegat blegat marked this pull request as ready for review April 27, 2019 07:37
@blegat
Copy link
Member Author

blegat commented Apr 27, 2019

Failing on Julia v0.7 when it redefines a struct:
https://github.com/JuliaOpt/MathOptInterface.jl/blob/208a9aa3d579d2811b1e7b6947fcb2b1ca890984/src/Utilities/model.jl#L582
I don't feel it's worth it adding a hack for Julia v0.7 given that it support was dropped:
https://discourse.julialang.org/t/julia-0-6-and-0-7-are-now-officially-unmaintained/20449/2

@blegat blegat mentioned this pull request Apr 27, 2019
@blegat blegat force-pushed the bl/improve_tests branch from 3955c2f to 3633e2a Compare April 27, 2019 22:04
@codecov-io
Copy link

codecov-io commented Apr 27, 2019

Codecov Report

Merging #715 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #715   +/-   ##
=======================================
  Coverage   93.73%   93.73%           
=======================================
  Files          54       54           
  Lines        5572     5572           
=======================================
  Hits         5223     5223           
  Misses        349      349

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7337108...3633e2a. Read the comment docs.

@blegat blegat merged commit 9970dbd into master Apr 28, 2019
@odow odow deleted the bl/improve_tests branch April 28, 2019 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants