File tree Expand file tree Collapse file tree 1 file changed +21
-9
lines changed Expand file tree Collapse file tree 1 file changed +21
-9
lines changed Original file line number Diff line number Diff line change 11@testset " profiling" begin
22
3- if MTL. is_m1 (current_device ()) && macos_version () >= v " 14.4"
4- @warn " Skipping profiling tests because of an M1-related bug on macOS 14.4"
3+ # determine if we can even run these tests
4+ run_tests = false
5+ if parse (Bool, get (ENV , " CI" , " false" ))
6+ @warn " Skipping profiling tests on CI due to sandboxing issues"
7+ elseif ! success (` xctrace version` )
8+ @warn " Skipping profiling tests because xctrace is not available; please install Xcode first"
59else
10+ version_output = chomp (read (` xctrace version` , String))
11+ m = match (r" xctrace version (\d +).(\d +)" , version_output)
12+ if m === nothing
13+ error (" Could not parse xctrace version output:\n $version_output " )
14+ else
15+ xcode_version = VersionNumber (parse (Int, m. captures[1 ]), parse (Int, m. captures[2 ]))
16+ if MTL. is_m1 (current_device ()) && macos_version () >= v " 14.4" && xcode_version < v " 15.3"
17+ @warn " Skipping profiling tests because of an M1-related bug on macOS 14.4 and Xcode < 15.3; please upgrade Xcode first"
18+ else
19+ run_tests = true
20+ end
21+ end
22+ end
623
24+ if run_tests
725mktempdir () do tmpdir
826cd (tmpdir) do
927
10- if parse (Bool, get (ENV , " CI" , " false" ))
11- @warn " Skipping profiling tests on CI due to sandboxing issues"
12- else
13-
1428@testset " macro" begin
1529 Metal. @profile identity (nothing )
1630 @test isdir (" julia_1.trace" )
1731end
1832
1933end
20-
21- end
22-
2334end
2435end
36+
2537end
You can’t perform that action at this time.
0 commit comments