summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/spack/test/conftest.py23
-rw-r--r--lib/spack/spack/test/data/config/compilers.yaml (renamed from lib/spack/spack/test/data/compilers.yaml)0
-rw-r--r--lib/spack/spack/test/data/config/config.yaml (renamed from lib/spack/spack/test/data/config.yaml)0
-rw-r--r--lib/spack/spack/test/data/config/packages.yaml (renamed from lib/spack/spack/test/data/packages.yaml)0
-rw-r--r--lib/spack/spack/test/data/config/repos.yaml (renamed from lib/spack/spack/test/data/repos.yaml)0
5 files changed, 8 insertions, 15 deletions
diff --git a/lib/spack/spack/test/conftest.py b/lib/spack/spack/test/conftest.py
index 572a38c225..7fb99a4147 100644
--- a/lib/spack/spack/test/conftest.py
+++ b/lib/spack/spack/test/conftest.py
@@ -363,23 +363,16 @@ def configuration_dir(tmpdir_factory, linux_os):
"""
tmpdir = tmpdir_factory.mktemp('configurations')
- # Name of the yaml files in the test/data folder
- test_path = py.path.local(spack.paths.test_path)
- compilers_yaml = test_path.join('data', 'compilers.yaml')
- packages_yaml = test_path.join('data', 'packages.yaml')
- config_yaml = test_path.join('data', 'config.yaml')
- repos_yaml = test_path.join('data', 'repos.yaml')
-
- # Create temporary 'site' and 'user' folders
- tmpdir.ensure('site', dir=True)
- tmpdir.ensure('user', dir=True)
+ # <test_path>/data/config has mock config yaml files in it
+ # copy these to the site config.
+ test_config = py.path.local(spack.paths.test_path).join('data', 'config')
+ test_config.copy(tmpdir.join('site'))
- # Copy the configurations that don't need further work
- packages_yaml.copy(tmpdir.join('site', 'packages.yaml'))
- config_yaml.copy(tmpdir.join('site', 'config.yaml'))
- repos_yaml.copy(tmpdir.join('site', 'repos.yaml'))
+ # Create temporary 'defaults', 'site' and 'user' folders
+ tmpdir.ensure('user', dir=True)
- # Write the one that needs modifications
+ # Slightly modify compilers.yaml to look like Linux
+ compilers_yaml = test_config.join('compilers.yaml')
content = ''.join(compilers_yaml.read()).format(linux_os)
t = tmpdir.join('site', 'compilers.yaml')
t.write(content)
diff --git a/lib/spack/spack/test/data/compilers.yaml b/lib/spack/spack/test/data/config/compilers.yaml
index 7aec138473..7aec138473 100644
--- a/lib/spack/spack/test/data/compilers.yaml
+++ b/lib/spack/spack/test/data/config/compilers.yaml
diff --git a/lib/spack/spack/test/data/config.yaml b/lib/spack/spack/test/data/config/config.yaml
index 0611251189..0611251189 100644
--- a/lib/spack/spack/test/data/config.yaml
+++ b/lib/spack/spack/test/data/config/config.yaml
diff --git a/lib/spack/spack/test/data/packages.yaml b/lib/spack/spack/test/data/config/packages.yaml
index c7256ddb33..c7256ddb33 100644
--- a/lib/spack/spack/test/data/packages.yaml
+++ b/lib/spack/spack/test/data/config/packages.yaml
diff --git a/lib/spack/spack/test/data/repos.yaml b/lib/spack/spack/test/data/config/repos.yaml
index 4fbbfe9d62..4fbbfe9d62 100644
--- a/lib/spack/spack/test/data/repos.yaml
+++ b/lib/spack/spack/test/data/config/repos.yaml