|
173 | 173 | @test_throws ReTestItems.NoTestException runtests(ti -> :b_tag in ti.tags, pkg; name="b", tags=[:nope]) |
174 | 174 |
|
175 | 175 | # can only filter on `ti.name` and `ti.tags` (at least for now) |
176 | | - @test_throws "no field file" runtests(ti -> contains(ti.file, "bar_"), pkg) |
| 176 | + expected = if VERSION < v"1.12.0-DEV" |
| 177 | + "no field file" |
| 178 | + else |
| 179 | + "no field `file`" |
| 180 | + end |
| 181 | + @test_throws expected runtests(ti -> contains(ti.file, "bar_"), pkg) |
177 | 182 | end |
178 | 183 |
|
179 | 184 | @testset "`@testitem` scoping rules" begin |
|
942 | 947 | @testset "non-zero timeout_profile_wait means we collect a CPU profile" begin |
943 | 948 | capture_timeout_profile(5) do logs |
944 | 949 | @test occursin("Information request received. A stacktrace will print followed by a $(default_peektime) second profile", logs) |
945 | | - @test count(r"pthread_cond_wait|__psych_cvwait", logs) > 0 # the stacktrace was printed (will fail on Windows) |
| 950 | + @test count(r"pthread_cond_wait|__psynch_cvwait", logs) > 0 # the stacktrace was printed (will fail on Windows) |
946 | 951 | @test occursin("Profile collected.", logs) |
947 | 952 | end |
948 | 953 | end |
|
951 | 956 | @testset "`set_peek_duration` is respected in `worker_init_expr`" begin |
952 | 957 | capture_timeout_profile(5, worker_init_expr=:(using Profile; Profile.set_peek_duration($default_peektime + 1.0))) do logs |
953 | 958 | @test occursin("Information request received. A stacktrace will print followed by a $(default_peektime + 1.0) second profile", logs) |
954 | | - @test count(r"pthread_cond_wait|__psych_cvwait", logs) > 0 # the stacktrace was printed (will fail on Windows) |
| 959 | + @test count(r"pthread_cond_wait|__psynch_cvwait", logs) > 0 # the stacktrace was printed (will fail on Windows) |
955 | 960 | @test occursin("Profile collected.", logs) |
956 | 961 | end |
957 | 962 | end |
|
962 | 967 | withenv("RETESTITEMS_TIMEOUT_PROFILE_WAIT" => "5") do |
963 | 968 | capture_timeout_profile(nothing) do logs |
964 | 969 | @test occursin("Information request received", logs) |
965 | | - @test count(r"pthread_cond_wait|__psych_cvwait", logs) > 0 # the stacktrace was printed (will fail on Windows) |
| 970 | + @test count(r"pthread_cond_wait|__psynch_cvwait", logs) > 0 # the stacktrace was printed (will fail on Windows) |
966 | 971 | @test occursin("Profile collected.", logs) |
967 | 972 | end |
968 | 973 | end |
|
972 | 977 | @testset "CPU profile with $(repr(log_capture))" for log_capture in (:eager, :batched) |
973 | 978 | capture_timeout_profile(5, nworker_threads=VERSION >= v"1.9" ? "3,2" : "3", logs=log_capture) do logs |
974 | 979 | @test occursin("Information request received", logs) |
975 | | - @test count(r"pthread_cond_wait|__psych_cvwait", logs) > 0 # the stacktrace was printed (will fail on Windows) |
| 980 | + @test count(r"pthread_cond_wait|__psynch_cvwait", logs) > 0 # the stacktrace was printed (will fail on Windows) |
976 | 981 | @test occursin("Profile collected.", logs) |
977 | 982 | end |
978 | 983 | end |
|
0 commit comments