summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Green <greenc@fnal.gov>2022-11-19 06:02:51 -0600
committerGitHub <noreply@github.com>2022-11-19 13:02:51 +0100
commit409cf185ce6353417030c12bb171d3069d93bc7f (patch)
tree7e1fb2c65c3d77907ead5a88d4dd3076889db7cd
parent602984460d8a6c189fa9127e9268707dfe4dff86 (diff)
downloadspack-409cf185ce6353417030c12bb171d3069d93bc7f.tar.gz
spack-409cf185ce6353417030c12bb171d3069d93bc7f.tar.bz2
spack-409cf185ce6353417030c12bb171d3069d93bc7f.tar.xz
spack-409cf185ce6353417030c12bb171d3069d93bc7f.zip
package_base.py: Fix #34006: test msg needs to be a string (#34007)
-rw-r--r--lib/spack/spack/package_base.py4
-rw-r--r--lib/spack/spack/test/cmd/install.py8
2 files changed, 10 insertions, 2 deletions
diff --git a/lib/spack/spack/package_base.py b/lib/spack/spack/package_base.py
index be0721e667..736e95d63e 100644
--- a/lib/spack/spack/package_base.py
+++ b/lib/spack/spack/package_base.py
@@ -2447,12 +2447,12 @@ class PackageBase(WindowsRPath, PackageViewMixin, metaclass=PackageMeta):
try:
fn = getattr(builder, name)
- msg = ("RUN-TESTS: {0}-time tests [{1}]".format(callback_type, name),)
+ msg = "RUN-TESTS: {0}-time tests [{1}]".format(callback_type, name)
print_test_message(logger, msg, True)
fn()
except AttributeError as e:
- msg = ("RUN-TESTS: method not implemented [{0}]".format(name),)
+ msg = "RUN-TESTS: method not implemented [{0}]".format(name)
print_test_message(logger, msg, True)
builder.pkg.test_failures.append((e, msg))
diff --git a/lib/spack/spack/test/cmd/install.py b/lib/spack/spack/test/cmd/install.py
index d1993be777..6d3d196f10 100644
--- a/lib/spack/spack/test/cmd/install.py
+++ b/lib/spack/spack/test/cmd/install.py
@@ -1178,3 +1178,11 @@ def test_install_use_buildcache(
# Alternative to --cache-only (always) or --no-cache (never)
for opt in ["auto", "only", "never"]:
install_use_buildcache(opt)
+
+
+@pytest.mark.regression("34006")
+@pytest.mark.disable_clean_stage_check
+def test_padded_install_runtests_root(install_mockery_mutable_config, mock_fetch):
+ spack.config.set("config:install_tree:padded_length", 255)
+ output = install("--test=root", "--no-cache", "test-build-callbacks", fail_on_error=False)
+ assert output.count("method not implemented") == 1