@@ -90,6 +90,7 @@ function try_runbenchmarks(;
9090 workers = 5 ,# Sys.CPU_THREADS,
9191 startup_file = Base. JLOptions (). startupfile == 1 ? " yes" : " no" ,
9292 are_different = are_different,
93+ allow_version_mismatch = false ,
9394 )
9495
9596 commands = Vector {Cmd} (undef, workers)
@@ -104,7 +105,8 @@ function try_runbenchmarks(;
104105 mkdir (projects[i])
105106 # bench_projectfile_exists && cp(bench_projectfile, joinpath(projects[i], "Project.toml"))
106107 cp (bench_project, projects[i], force= true )
107- script = " let; using RegressionTests; RegressionTests.FILTER[] = RegressionTests.deserialize($(repr (filter_path)) ); end; let; include($rfile ); end; using RegressionTests; RegressionTests.serialize($(repr (channels[i])) , (RegressionTests.STATIC_METADATA, RegressionTests.RUNTIME_METADATA, RegressionTests.DATA))"
108+ verify_version = allow_version_mismatch ? " " : " RegressionTests.verify_source($(repr (dirname (@__DIR__ ))) );"
109+ script = " let; using RegressionTests;$verify_version RegressionTests.FILTER[] = RegressionTests.deserialize($(repr (filter_path)) ); end; let; include($rfile ); end; using RegressionTests; RegressionTests.serialize($(repr (channels[i])) , (RegressionTests.STATIC_METADATA, RegressionTests.RUNTIME_METADATA, RegressionTests.DATA))"
108110 commands[i] = if VERSION < v " 1.10.0-alpha1"
109111 # --compiled-modules=no is a workaround for https://github.com/JuliaLang/julia/issues/52265
110112 ` $julia_exe --compiled-modules=no --startup-file=$startup_file --project=$(projects[i]) -e $script `
688690
689691# Callie
690692
693+ verify_source (path) = (path == dirname (@__DIR__ )) || error ("""
694+ RegressionTests version mismatch
695+ Outer process is at $path (version $(Pkg. TOML. parsefile (joinpath (path, " Project.toml" ))[" version" ]) )
696+ Inner process is at $(dirname (@__DIR__ )) (version $(Pkg. TOML. parsefile (joinpath (dirname (@__DIR__ ), " Project.toml" ))[" version" ]) )
697+ Hint: make sure the bench project and the test project have the same version of RegressionTests.""" )
698+
691699const FILTER = Ref {Union{Nothing, BitVector}} (nothing )
692700const STATIC_METADATA = Tuple{Symbol, Int, String}[]
693701const GROUP_ID = Ref (0 )
0 commit comments