Skip to content

Commit

Permalink
add minimal extensions unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
omlins committed Dec 13, 2023
1 parent d934bc3 commit adecfdb
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/test_projects/Diffusion3D_minimal/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name = "Diffusion3D_minimal"
uuid = "91637811-9d05-4227-81a2-fe1d069b6ecb"
authors = ["Samuel Omlin <samuel.omlin@cscs.ch>"]
version = "0.1.0"

[deps]
ParallelStencil = "94395366-693c-11ea-3b26-d9b7aac5d958"

[compat]
ParallelStencil = ">= 0.4.0"

[weakdeps]
AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"

[extensions]
D3D_AMDGPUExt = "AMDGPU"
D3D_CUDAExt = "CUDA"
4 changes: 4 additions & 0 deletions test/test_projects/Diffusion3D_minimal/ext/D3D_AMDGPUExt.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module D3D_AMDGPUExt
import Diffusion3D_minimal
h() = return
end
4 changes: 4 additions & 0 deletions test/test_projects/Diffusion3D_minimal/ext/D3D_CUDAExt.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module D3D_CUDAExt
import Diffusion3D_minimal
g() = return
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module Diffusion3D_minimal
using ParallelStencil
f() = return
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
push!(LOAD_PATH, "@stdlib") # NOTE: this is needed to enable this test to run from the Pkg manager
push!(LOAD_PATH, joinpath(@__DIR__, ".."))
using Test
using Pkg
Pkg.activate(joinpath(@__DIR__, "test_projects", "Diffusion3D_minimal"))
Pkg.instantiate()
import AMDGPU
using Diffusion3D_minimal
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
push!(LOAD_PATH, "@stdlib") # NOTE: this is needed to enable this test to run from the Pkg manager
push!(LOAD_PATH, joinpath(@__DIR__, ".."))
using Test
using Pkg
Pkg.activate(joinpath(@__DIR__, "test_projects", "Diffusion3D_minimal"))
Pkg.instantiate()
import CUDA
using Diffusion3D_minimal
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
push!(LOAD_PATH, "@stdlib") # NOTE: this is needed to enable this test to run from the Pkg manager
push!(LOAD_PATH, joinpath(@__DIR__, ".."))
using Test
using Pkg
Pkg.activate(joinpath(@__DIR__, "test_projects", "Diffusion3D_minimal"))
Pkg.instantiate()
using Diffusion3D_minimal

0 comments on commit adecfdb

Please sign in to comment.