Skip to content

Commit

Permalink
CGroups: Add mixed-CGroups v1 & v2 tests [#125]
Browse files Browse the repository at this point in the history
  • Loading branch information
HenrikBengtsson committed Jan 19, 2025
1 parent 2ba2b4a commit 14bd581
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: parallelly
Version: 1.41.0-9007
Version: 1.41.0-9008
Title: Enhancing the 'parallel' Package
Imports:
parallel,
Expand Down
Binary file added inst/test-data/mixed-cgroups/slurm-cgroups.tar.gz
Binary file not shown.
7 changes: 7 additions & 0 deletions inst/test-data/mixed-cgroups/slurm.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ncores <- parallelly::availableCores(which = "all")
print(ncores)

stopifnot(
"cgroups.cpuset" %in% names(ncores),
ncores[["cgroups.cpuset"]] == 1L
)
2 changes: 1 addition & 1 deletion tests/cgroups.R
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ stopifnot(
message("*** cgroups ... DONE")

root <- system.file(package = "parallelly", "test-data", mustWork = TRUE)
for (dir in c("no-cgroups", "cgroups1", "cgroups2")) {
for (dir in c("no-cgroups", "mixed-cgroups", "cgroups1", "cgroups2")) {
message(sprintf("%s - real-world ...", dir))
path <- file.path(root, dir)
stopifnot(file_test("-d", path))
Expand Down

0 comments on commit 14bd581

Please sign in to comment.