summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin.mock/packages/build-env-compiler-var-a/package.py14
-rw-r--r--var/spack/repos/builtin.mock/packages/build-env-compiler-var-b/package.py20
2 files changed, 34 insertions, 0 deletions
diff --git a/var/spack/repos/builtin.mock/packages/build-env-compiler-var-a/package.py b/var/spack/repos/builtin.mock/packages/build-env-compiler-var-a/package.py
new file mode 100644
index 0000000000..ea6f0f34e8
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/build-env-compiler-var-a/package.py
@@ -0,0 +1,14 @@
+# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack.package import *
+
+
+class BuildEnvCompilerVarA(Package):
+ """Package with runtime variable that should be dropped in the parent's build environment."""
+
+ url = "https://www.example.com"
+ version("1.0", md5="0123456789abcdef0123456789abcdef")
+ depends_on("build-env-compiler-var-b", type="build")
diff --git a/var/spack/repos/builtin.mock/packages/build-env-compiler-var-b/package.py b/var/spack/repos/builtin.mock/packages/build-env-compiler-var-b/package.py
new file mode 100644
index 0000000000..7905869b34
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/build-env-compiler-var-b/package.py
@@ -0,0 +1,20 @@
+# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack.package import *
+
+
+class BuildEnvCompilerVarB(Package):
+ """Package with runtime variable that should be dropped in the parent's build environment."""
+
+ url = "https://www.example.com"
+ version("1.0", md5="0123456789abcdef0123456789abcdef")
+
+ def setup_run_environment(self, env):
+ env.set("CC", "this-should-be-dropped")
+ env.set("CXX", "this-should-be-dropped")
+ env.set("FC", "this-should-be-dropped")
+ env.set("F77", "this-should-be-dropped")
+ env.set("ANOTHER_VAR", "this-should-be-present")