diff --git a/setup-env.sh b/setup-env.sh index aec1f4530e..dbfc7fb5ba 100755 --- a/setup-env.sh +++ b/setup-env.sh @@ -11,12 +11,13 @@ fi if [[ ${machine:0:1} == "/" ]]; then export SPACK_SYSTEM_CONFIG_PATH="$machine"/config export SPACK_USER_CONFIG_PATH="$parent_dir"/sysconfigs/uenv + export SPACK_USER_CACHE_PATH="$parent_dir"/user-cache/uenv else export SPACK_SYSTEM_CONFIG_PATH="$parent_dir"/sysconfigs/"$machine" export SPACK_USER_CONFIG_PATH="$parent_dir"/user-config + export SPACK_USER_CACHE_PATH="$parent_dir"/user-cache/"$machine" fi -export SPACK_USER_CACHE_PATH="$parent_dir"/user-cache . "$parent_dir"/spack/share/spack/setup-env.sh diff --git a/src/spack_commands.py b/src/spack_commands.py index 12e347c46e..73efaa080c 100644 --- a/src/spack_commands.py +++ b/src/spack_commands.py @@ -31,9 +31,9 @@ def log_with_spack(command: str, if uenv: spack_env += ' /user-environment' - # Only use srun as Jenkins user and not on balfrin + # Only use srun as Jenkins user and on machines where it is available use_srun = allow_srun and getpass.getuser() == 'jenkins' and machine_name( - ) != 'balfrin' + ) in ['daint', 'tsa'] uenv_args = '' if uenv: @@ -48,7 +48,6 @@ def log_with_spack(command: str, # The '-c' argument should be in sync with # sysconfig//config.yaml config:build_jobs for max efficiency - # No entry for balfrin, trigger and error instead if requested to run with srun srun = { 'daint': 'srun -t 02:00:00 -C gpu -A g110 -c 12 -n 1', 'tsa': 'srun -t 02:00:00 -c 6', diff --git a/test/system_test.py b/test/system_test.py index ba9e77e4f1..329f292629 100644 --- a/test/system_test.py +++ b/test/system_test.py @@ -76,6 +76,7 @@ def test_install_libfyaml_default(): @pytest.mark.no_tsa # No uenv on Tsa @pytest.mark.no_daint # No uenv on Daint +@pytest.mark.no_balfrin # Does not work as expected @pytest.mark.libfyaml def test_install_libfyaml_default_uenv(): spack_install('libfyaml', test_root=False, uenv=PREPOST) @@ -181,14 +182,16 @@ def icon_env_test(spack_env: str, out_of_source: bool = False): check=True, shell=True) + log_filename = sanitized_filename(spack_env) + if out_of_source: build_dir = os.path.join(unique_folder, 'build') os.makedirs(build_dir, exist_ok=True) shutil.copytree(os.path.join(unique_folder, 'config'), os.path.join(build_dir, 'config')) unique_folder = build_dir + log_filename += '_out_of_source' - log_filename = sanitized_filename(spack_env) + '_out_of_source' log_with_spack('spack install -n -v', 'system_test', log_filename, @@ -328,13 +331,6 @@ def test_py_black_install_default(devirt_env): spack_install('py-black') -@pytest.mark.no_tsa # No uenv on Tsa -@pytest.mark.no_daint # No uenv on Daint -@pytest.mark.py_black -def test_install_py_black_default_uenv(devirt_env): - spack_install('py-black', uenv=PREPOST) - - @pytest.mark.py_boltons def test_py_boltons_install_default(devirt_env): spack_install('py-boltons')