From 91d5ba6346d09a224e909b99ae939b22c4119456 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Sun, 16 Feb 2025 12:00:03 -0500 Subject: [PATCH 1/3] Add some very basic tests --- test/condor.jl | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/condor.jl diff --git a/test/condor.jl b/test/condor.jl new file mode 100644 index 0000000..cf87cf8 --- /dev/null +++ b/test/condor.jl @@ -0,0 +1,12 @@ +@test Distributed.nprocs() == 1 +@test Distributed.nworkers() == 1 +@test Distributed.procs() == [1] +@test Distributed.workers() == [1] + +mgr = HTCManager(4) +Distributed.addprocs(mgr) + +@test Distributed.nprocs() == 5 +@test Distributed.nworkers() == 4 +@test Distributed.procs() == [1, 2, 3, 4, 5] +@test Distributed.workers() == [2, 3, 4, 5] From 6e1a228a111425b168b4981dd1a2199445e7df86 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Sun, 16 Feb 2025 12:00:43 -0500 Subject: [PATCH 2/3] Update runtests.jl --- test/runtests.jl | 39 ++------------------------------------- 1 file changed, 2 insertions(+), 37 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index b0093e9..22495d0 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -9,47 +9,12 @@ using Distributed: workers, nworkers using Distributed: procs, nprocs using Distributed: remotecall_fetch, @spawnat using Test: @testset, @test, @test_skip -# ElasticManager: -using HTCondorClusterManager: ElasticManager -# Slurm: -using HTCondorClusterManager: addprocs_slurm, SlurmManager -# SGE: -using HTCondorClusterManager: addprocs_sge, SGEManager - -const test_args = lowercase.(strip.(ARGS)) - -@info "" test_args -slurm_is_installed() = !isnothing(Sys.which("sbatch")) -qsub_is_installed() = !isnothing(Sys.which("qsub")) +using HTCondorClusterManager: addprocs_sge, SGEManager @testset "HTCondorClusterManager.jl" begin include("elastic.jl") - if slurm_is_installed() - @info "Running the Slurm tests..." Sys.which("sbatch") - include("slurm.jl") - else - if "slurm" in test_args - @error "ERROR: The Slurm tests were explicitly requested in ARGS, but sbatch was not found, so the Slurm tests cannot be run" Sys.which("sbatch") test_args - @test false - else - @warn "sbatch was not found - Slurm tests will be skipped" Sys.which("sbatch") - @test_skip false - end - end - - if qsub_is_installed() - @info "Running the SGE (via qsub) tests..." Sys.which("qsub") - include("sge_qsub.jl") - else - if "sge_qsub" in test_args - @error "ERROR: The SGE tests were explicitly requested in ARGS, but qsub was not found, so the SGE tests cannot be run" Sys.which("qsub") test_args - @test false - else - @warn "qsub was not found - SGE tests will be skipped" Sys.which("qsub") - @test_skip false - end - end + include("condor.jl") end # @testset From ea4798d009441f4041e2babfcad5b94aa41fe62a Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Tue, 18 Feb 2025 19:40:09 -0500 Subject: [PATCH 3/3] Update runtests.jl --- test/runtests.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/runtests.jl b/test/runtests.jl index 22495d0..6f55139 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -10,7 +10,7 @@ using Distributed: procs, nprocs using Distributed: remotecall_fetch, @spawnat using Test: @testset, @test, @test_skip -using HTCondorClusterManager: addprocs_sge, SGEManager +using HTCondorClusterManager: addprocs_htc, HTCManager @testset "HTCondorClusterManager.jl" begin include("elastic.jl")