Skip to content

Commit

Permalink
gnnlib
Browse files Browse the repository at this point in the history
  • Loading branch information
CarloLucibello committed Nov 27, 2024
1 parent 3ed702b commit 38e6601
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 9 deletions.
12 changes: 12 additions & 0 deletions GNNlib/test/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[deps]
GNNGraphs = "aed8fd31-079b-4b5a-b342-a13352159b8c"
GNNlib = "a6a84749-d869-43f8-aacc-be26a1996e48"
MLUtils = "f1d291b0-491e-4a28-83b9-f70985020b54"
NNlib = "872c559c-99b0-510c-b3b7-b6c96a88d5cd"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TestItemRunner = "f8b46487-2199-4994-9208-9a1283c18c0a"
5 changes: 3 additions & 2 deletions GNNlib/test/msgpass_tests.jl → GNNlib/test/msgpass.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@testitem "msgpass" setup=[SharedTestSetup] begin
@testitem "msgpass" setup=[TestModuleNNlib] begin
using .TestModuleNNlib
#TODO test all graph types
GRAPH_T = :coo
in_channel = 10
Expand Down Expand Up @@ -137,4 +138,4 @@
end
end

end
end
32 changes: 27 additions & 5 deletions GNNlib/test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
using GNNlib
using Test
using ReTestItems
using Random, Statistics
using TestItemRunner

runtests(GNNlib)
## See https://www.julia-vscode.org/docs/stable/userguide/testitems/
## for how to run the tests within VS Code.
## See test_module.jl for the test infrastructure.

## Uncomment below and in test_module.jl to change the default test settings
# ENV["GNN_TEST_CPU"] = "false"
# ENV["GNN_TEST_CUDA"] = "true"
# ENV["GNN_TEST_AMDGPU"] = "true"
# ENV["GNN_TEST_Metal"] = "true"

# The only available tag at the moment is :gpu
# Tests not tagged with :gpu are considered to be CPU tests
# Tests tagged with :gpu should run on all GPU backends

if get(ENV, "GNN_TEST_CPU", "true") == "true"
@run_package_tests filter = ti -> :gpu ti.tags
end
if get(ENV, "GNN_TEST_CUDA", "false") == "true"
@run_package_tests filter = ti -> :gpu ti.tags
end
if get(ENV, "GNN_TEST_AMDGPU", "false") == "true"
@run_package_tests filter = ti -> :gpu ti.tags
end
if get(ENV, "GNN_TEST_Metal", "false") == "true"
@run_package_tests filter = ti -> :gpu ti.tags
end
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@testsetup module SharedTestSetup
@testmodule TestModuleNNlib begin

import Reexport: @reexport

Expand All @@ -9,4 +9,4 @@ import Reexport: @reexport
@reexport using SparseArrays
@reexport using Test, Random, Statistics

end
end # module
File renamed without changes.

0 comments on commit 38e6601

Please sign in to comment.