Skip to content
Snippets Groups Projects
Commit aff87aa9 authored by Ashwin Kumar Karnad's avatar Ashwin Kumar Karnad
Browse files

update test to auto detect system compiler

parent 6dee8bc1
No related branches found
No related tags found
2 merge requests!19Move linux-debian11 into main,!1Resolve "First draft for user interface for top level install command"
...@@ -147,10 +147,11 @@ def test_install_environment(tmp_path): ...@@ -147,10 +147,11 @@ def test_install_environment(tmp_path):
with open(module_file,'w') as f: with open(module_file,'w') as f:
f.write(lines) f.write(lines)
# Replace gcc@10.2.1 with gcc#13.1.1 for testing on laptop # Replace gcc@10.2.1 with gcc#13.1.1 or available system gcc for testing on laptop
gcc_ver = subprocess.run(['gcc -dumpfullversion'],shell=True,capture_output=True).stdout.decode('utf-8').strip()
setup_file = release_base_dir / "spack-environments/spack_setup.sh" setup_file = release_base_dir / "spack-environments/spack_setup.sh"
with open(setup_file,'r') as f: with open(setup_file,'r') as f:
lines = f.read().replace('system_compiler="gcc@10.2.1"','system_compiler="gcc@13.1.1"') lines = f.read().replace('system_compiler="gcc@10.2.1"',f'system_compiler="gcc@{gcc_ver}"')
with open(setup_file,'w') as f: with open(setup_file,'w') as f:
f.write(lines) f.write(lines)
# install global_generic toolchain # install global_generic toolchain
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment