Skip to content

Move testsuite to ParallelTestRunner#564

Open
christiangnrd wants to merge 8 commits intoJuliaGPU:masterfrom
christiangnrd:ptr
Open

Move testsuite to ParallelTestRunner#564
christiangnrd wants to merge 8 commits intoJuliaGPU:masterfrom
christiangnrd:ptr

Conversation

@christiangnrd
Copy link
Member

No description provided.

@christiangnrd christiangnrd marked this pull request as ready for review February 6, 2026 15:44
@codecov
Copy link

codecov bot commented Feb 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.42%. Comparing base (39ae91f) to head (d887815).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #564      +/-   ##
==========================================
- Coverage   79.42%   79.42%   -0.01%     
==========================================
  Files          48       48              
  Lines        3150     3149       -1     
==========================================
- Hits         2502     2501       -1     
  Misses        648      648              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

Your PR requires formatting changes to meet the project's style guidelines.
Please consider running Runic (git runic master) to apply these changes.

Click here to view the suggested changes.
diff --git a/test/execution.jl b/test/execution.jl
index 1e2e179..d4fc794 100644
--- a/test/execution.jl
+++ b/test/execution.jl
@@ -108,10 +108,10 @@ end
         export external_dummy
         external_dummy() = return
     end
-    import .KernelModule
+        import .KernelModule
     @oneapi KernelModule.external_dummy()
     @eval begin
-        using .KernelModule
+            using .KernelModule
         @oneapi external_dummy()
     end
 
diff --git a/test/runtests.jl b/test/runtests.jl
index 06d77db..c5f46dc 100644
--- a/test/runtests.jl
+++ b/test/runtests.jl
@@ -37,10 +37,12 @@ init_worker_code = quote
     include($gpuarrays_testsuite)
     testf(f, xs...; kwargs...) = TestSuite.compare(f, oneArray, xs...; kwargs...)
 
-    const eltypes = [Int16, Int32, Int64,
-                    Complex{Int16}, Complex{Int32}, Complex{Int64},
-                    Float16, Float32,
-                    ComplexF32]
+    const eltypes = [
+        Int16, Int32, Int64,
+        Complex{Int16}, Complex{Int32}, Complex{Int64},
+        Float16, Float32,
+        ComplexF32,
+    ]
 
     const float16_supported = oneL0.module_properties(device()).fp16flags & oneL0.ZE_DEVICE_MODULE_FLAG_FP16 == oneL0.ZE_DEVICE_MODULE_FLAG_FP16
     if float16_supported
@@ -58,12 +60,12 @@ init_worker_code = quote
 
     # NOTE: based on test/pkg.jl::capture_stdout, but doesn't discard exceptions
     macro grab_output(ex)
-        quote
+        return quote
             mktemp() do fname, fout
                 ret = nothing
                 open(fname, "w") do fout
                     redirect_stdout(fout) do
-                                                ret = $(esc(ex))
+                        ret = $(esc(ex))
                     end
                 end
                 ret, read(fname, String)
@@ -74,32 +76,38 @@ init_worker_code = quote
     # Run some code on-device
     macro on_device(ex...)
         code = ex[end]
-        kwargs = ex[1:end-1]
+        kwargs = ex[1:(end - 1)]
 
         @gensym kernel
-        esc(quote
-            let
-                function $kernel()
-                    $code
-                    return
+        return esc(
+            quote
+                let
+                    function $kernel()
+                        $code
+                        return
                 end
 
-                oneAPI.@sync @oneapi $(kwargs...) $kernel()
+                    oneAPI.@sync @oneapi $(kwargs...) $kernel()
             end
-        end)
+            end
+        )
     end
 
     # helper function for sinking a value to prevent the callee from getting optimized away
     @inline sink(i::Int32) =
-        Base.llvmcall("""%slot = alloca i32
-                        store volatile i32 %0, i32* %slot
-                        %value = load volatile i32, i32* %slot
-                        ret i32 %value""", Int32, Tuple{Int32}, i)
+        Base.llvmcall(
+        """%slot = alloca i32
+        store volatile i32 %0, i32* %slot
+        %value = load volatile i32, i32* %slot
+        ret i32 %value""", Int32, Tuple{Int32}, i
+    )
     @inline sink(i::Int64) =
-        Base.llvmcall("""%slot = alloca i64
-                        store volatile i64 %0, i64* %slot
-                        %value = load volatile i64, i64* %slot
-                        ret i64 %value""", Int64, Tuple{Int64}, i)
+        Base.llvmcall(
+        """%slot = alloca i64
+        store volatile i64 %0, i64* %slot
+        %value = load volatile i64, i64* %slot
+        ret i64 %value""", Int64, Tuple{Int64}, i
+    )
 end
 
 init_code = quote
@@ -107,8 +115,8 @@ init_code = quote
 
     import ..TestSuite, ..testf
     import ..eltypes, ..float16_supported, ..float64_supported,
-           ..validation_layer, ..parameter_validation,
-           ..@grab_output, ..@on_device, ..sink
+        ..validation_layer, ..parameter_validation,
+        ..@grab_output, ..@on_device, ..sink
 end
 
 runtests(oneAPI, args; testsuite, init_code, init_worker_code)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant