Skip to content

Commit

Permalink
Merge pull request #1458 from buildtesters/move_purge_settings
Browse files Browse the repository at this point in the history
Move purge settings to top-level in configuration file
  • Loading branch information
shahzebsiddiqui committed Apr 28, 2023
2 parents 0cd3e13 + daf7ef8 commit d9fe213
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 11 deletions.
4 changes: 1 addition & 3 deletions buildtest/cli/buildspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ def __init__(
"buildspecs"
].get("formatfields")
self.header = header
self.pager = pager or self.configuration.target_config["buildspecs"].get(
"pager"
)
self.pager = pager or self.configuration.target_config.get("pager")
self.count = count or self.configuration.target_config["buildspecs"].get(
"count"
)
Expand Down
10 changes: 5 additions & 5 deletions buildtest/schemas/settings.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@
"minimum": 1,
"description": "Specify timeout duration in number of seconds"
},
"pager":
{
"type": "boolean",
"description": "A boolean to determine whether to enable paging when viewing buildspec cache"
},
"buildspecs":
{
"type": "object",
Expand All @@ -90,11 +95,6 @@
"type": "boolean",
"description": "A boolean to determine whether to enable terse mode when viewing buildspec cache"
},
"pager":
{
"type": "boolean",
"description": "A boolean to determine whether to enable paging when viewing buildspec cache"
},
"root": {
"type": "array",
"items": {
Expand Down
6 changes: 4 additions & 2 deletions buildtest/settings/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ system:
# pool size for parallel processing using multiprocessing.Pool. Pool Size must be 1 or higher. The pool size is calculated as follows: poolsize = min(poolsize, os.cpu_count())
poolsize: 1

# determine whether to enable pagination
pager: False

buildspecs:
# whether to rebuild cache file automatically when running `buildtest buildspec find`
rebuild: False
Expand All @@ -23,8 +26,7 @@ system:
formatfields: "name,description"
# enable terse mode
terse: False
# determine whether to enable pagination
pager: False

# specify list of directories to search for buildspecs when building cache
#root: [ $BUILDTEST_ROOT/examples, /tmp/buildspecs ]
executors:
Expand Down
10 changes: 9 additions & 1 deletion buildtest/settings/spack_container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,15 @@ system:
description: Generic System
moduletool: lmod
testdir: "~/runs"
buildspec_roots: [$BUILDTEST_ROOT/examples]
pager: False

buildspecs:
rebuild: False
count: 15
formatfields: "name,description"
terse: False
root: [$BUILDTEST_ROOT/examples]

executors:
local:
bash:
Expand Down
1 change: 1 addition & 0 deletions tests/settings/ascent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ system:
hostnames:
- login1.ascent.olcf.ornl.gov
moduletool: lmod
pager: False
executors:
defaults:
pollinterval: 30
Expand Down
1 change: 1 addition & 0 deletions tests/settings/jlse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ system:
hostnames:
- jlselogin*
moduletool: environment-modules
pager: False
executors:
defaults:
pollinterval: 30
Expand Down
1 change: 1 addition & 0 deletions tests/settings/nersc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ system:
perlmutter:
hostnames: ["login*"]
moduletool: lmod
pager: False
compilers:
enable_prgenv: true
prgenv_modules:
Expand Down
1 change: 1 addition & 0 deletions tests/settings/pbs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ system:
generic:
hostnames: ['.*']
moduletool: N/A
pager: False
executors:
defaults:
pollinterval: 5
Expand Down

0 comments on commit d9fe213

Please sign in to comment.