diff --git a/src/LegendTestData.jl b/src/LegendTestData.jl index b955b24..bdad7b6 100644 --- a/src/LegendTestData.jl +++ b/src/LegendTestData.jl @@ -26,4 +26,16 @@ legend_test_data_path() = joinpath(artifact"legend_testdata", "legend-exp-legend export legend_test_data_path +""" + activate_legend_test_data_config() + +Set environment variable `"LEGEND_DATA_CONFIG"` to the LEGEND test data +configuration +""" +function activate_legend_test_data_config() + testdata_dir = joinpath(legend_test_data_path(), "data", "legend") + ENV["LEGEND_DATA_CONFIG"] = joinpath(testdata_dir, "config.json") +end +export activate_legend_test_data_config + end # module diff --git a/test/runtests.jl b/test/runtests.jl index 5540c3e..b70358c 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -31,4 +31,9 @@ using Test @test crystal_metadata.impurity_measurements.distance_from_seed_end_mm == [0, 14, 30, 50, 80] end + @testset "Test data config" begin + ENV["LEGEND_DATA_CONFIG"] = "" + activate_legend_test_data_config() + @test isfile(ENV["LEGEND_DATA_CONFIG"]) + end end # testset