|
14 | 14 | using Mera
|
15 | 15 |
|
16 | 16 | function setup_test_data()
|
| 17 | + # Check if external data should be skipped before attempting download |
| 18 | + if (haskey(ENV, "MERA_SKIP_EXTERNAL_DATA") && ENV["MERA_SKIP_EXTERNAL_DATA"] == "true") || |
| 19 | + (haskey(ENV, "MERA_SKIP_HEAVY") && ENV["MERA_SKIP_HEAVY"] == "true") || |
| 20 | + (haskey(ENV, "MERA_SKIP_DATA_TESTS") && ENV["MERA_SKIP_DATA_TESTS"] == "true") |
| 21 | + println("⏭️ External data download skipped by environment variable") |
| 22 | + return false |
| 23 | + end |
| 24 | + |
17 | 25 | # Download and extract test simulation data (always fresh for each test run)
|
18 | 26 | test_data_dir = joinpath(@__DIR__, "test_data")
|
19 | 27 |
|
@@ -144,13 +152,23 @@ end
|
144 | 152 | function run_simulation_data_tests()
|
145 | 153 | # Check if we're in CI and should skip data-heavy tests
|
146 | 154 | is_ci = haskey(ENV, "CI") || haskey(ENV, "GITHUB_ACTIONS") || haskey(ENV, "MERA_CI_MODE")
|
147 |
| - skip_data_tests = haskey(ENV, "MERA_SKIP_DATA_TESTS") && ENV["MERA_SKIP_DATA_TESTS"] == "true" |
| 155 | + skip_data_tests = (haskey(ENV, "MERA_SKIP_DATA_TESTS") && ENV["MERA_SKIP_DATA_TESTS"] == "true") || |
| 156 | + (haskey(ENV, "MERA_SKIP_EXTERNAL_DATA") && ENV["MERA_SKIP_EXTERNAL_DATA"] == "true") || |
| 157 | + (haskey(ENV, "MERA_SKIP_HEAVY") && ENV["MERA_SKIP_HEAVY"] == "true") |
148 | 158 |
|
149 | 159 | @testset "Real Simulation Data Tests" begin
|
150 | 160 |
|
151 | 161 | if skip_data_tests
|
152 |
| - @test_skip "Simulation data tests skipped (MERA_SKIP_DATA_TESTS=true)" |
153 |
| - println("⏭️ Simulation data tests skipped by environment variable") |
| 162 | + if haskey(ENV, "MERA_SKIP_EXTERNAL_DATA") && ENV["MERA_SKIP_EXTERNAL_DATA"] == "true" |
| 163 | + @test_skip "Simulation data tests skipped (MERA_SKIP_EXTERNAL_DATA=true)" |
| 164 | + println("⏭️ Simulation data tests skipped - external data disabled") |
| 165 | + elseif haskey(ENV, "MERA_SKIP_HEAVY") && ENV["MERA_SKIP_HEAVY"] == "true" |
| 166 | + @test_skip "Simulation data tests skipped (MERA_SKIP_HEAVY=true)" |
| 167 | + println("⏭️ Simulation data tests skipped - heavy tests disabled") |
| 168 | + else |
| 169 | + @test_skip "Simulation data tests skipped (MERA_SKIP_DATA_TESTS=true)" |
| 170 | + println("⏭️ Simulation data tests skipped by environment variable") |
| 171 | + end |
154 | 172 | return
|
155 | 173 | end
|
156 | 174 |
|
|
0 commit comments