Skip to content

Commit 2eeac93

Browse files
committed
detect 'SYSTEM' toolchain as special case in easystack files
1 parent 13abeb3 commit 2eeac93

File tree

3 files changed

+19
-9
lines changed

3 files changed

+19
-9
lines changed

easybuild/framework/easystack.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,18 @@ def parse(filepath):
110110
raise EasyBuildError("Toolchains for software '%s' are not defined in %s", name, filepath)
111111
for toolchain in toolchains:
112112
toolchain = str(toolchain)
113-
toolchain_parts = toolchain.split('-', 1)
114-
if len(toolchain_parts) == 2:
115-
toolchain_name, toolchain_version = toolchain_parts
116-
elif len(toolchain_parts) == 1:
117-
toolchain_name, toolchain_version = toolchain, ''
113+
114+
if toolchain == 'SYSTEM':
115+
toolchain_name, toolchain_version = 'system', ''
118116
else:
119-
raise EasyBuildError("Incorrect toolchain specification for '%s' in %s, too many parts: %s",
120-
name, filepath, toolchain_parts)
117+
toolchain_parts = toolchain.split('-', 1)
118+
if len(toolchain_parts) == 2:
119+
toolchain_name, toolchain_version = toolchain_parts
120+
elif len(toolchain_parts) == 1:
121+
toolchain_name, toolchain_version = toolchain, ''
122+
else:
123+
raise EasyBuildError("Incorrect toolchain specification for '%s' in %s, too many parts: %s",
124+
name, filepath, toolchain_parts)
121125

122126
try:
123127
# if version string containts asterisk or labels, raise error (asterisks not supported)

test/framework/easystacks/test_easystack_basic.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@ software:
55
versions:
66
2.25:
77
2.26:
8+
foss:
9+
toolchains:
10+
SYSTEM:
11+
versions: [2018a]
812
toy:
913
toolchains:
1014
gompi-2018a:
1115
versions:
1216
0.0:
13-
versionsuffix: '-test'
17+
versionsuffix: '-test'

test/framework/options.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5725,10 +5725,12 @@ def test_easystack_basic(self):
57255725
patterns = [
57265726
r"[\S\s]*INFO Building from easystack:[\S\s]*",
57275727
r"[\S\s]*DEBUG EasyStack parsed\. Proceeding to install these Easyconfigs: "
5728-
r"binutils-2.25-GCCcore-4.9.3.eb, binutils-2.26-GCCcore-4.9.3.eb, toy-0.0-gompi-2018a-test.eb",
5728+
r"binutils-2.25-GCCcore-4.9.3.eb, binutils-2.26-GCCcore-4.9.3.eb, "
5729+
r"foss-2018a.eb, toy-0.0-gompi-2018a-test.eb",
57295730
r"\* \[ \] .*/test_ecs/b/binutils/binutils-2.25-GCCcore-4.9.3.eb \(module: binutils/2.25-GCCcore-4.9.3\)",
57305731
r"\* \[ \] .*/test_ecs/b/binutils/binutils-2.26-GCCcore-4.9.3.eb \(module: binutils/2.26-GCCcore-4.9.3\)",
57315732
r"\* \[ \] .*/test_ecs/t/toy/toy-0.0-gompi-2018a-test.eb \(module: toy/0.0-gompi-2018a-test\)",
5733+
r"\* \[x\] .*/test_ecs/f/foss/foss-2018a.eb \(module: foss/2018a\)",
57325734
]
57335735
for pattern in patterns:
57345736
regex = re.compile(pattern)

0 commit comments

Comments
 (0)