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

abstract testing of buildlog

parent 71e9ea32
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"
......@@ -122,6 +122,7 @@ def test_install_environment(tmp_path):
script_dir.mkdir(exist_ok=True, parents=True)
spack_environments = "spack-environments"
mpsd_release_to_test = "dev-23a"
toolchain_to_test = "global_generic"
mpsd_microarch=os.getenv("MPSD_MICROARCH",'UNKNOWN_MICROARCH')
release_base_dir = script_dir / mpsd_release_to_test
prepare_result = mod.prepare_environment(
......@@ -156,8 +157,8 @@ def test_install_environment(tmp_path):
f.write(lines)
# install global_generic toolchain
install_result = mod.install_environment(
mpsd_release="dev-23a",
toolchains=["global_generic"],
mpsd_release=mpsd_release_to_test,
toolchains=[toolchain_to_test],
script_dir=script_dir,
enable_build_cache=False
)
......@@ -172,7 +173,7 @@ def test_install_environment(tmp_path):
# test that the build log is created correctly
# check that a file with glob build_globale_generic_dev-23a*.log exists at release_base_dir/mpsd_microarch
build_log = list((release_base_dir/mpsd_microarch).glob('build_global_generic_dev-23a*.log'))
build_log = list((release_base_dir/mpsd_microarch).glob(f'build_{toolchain_to_test}_{mpsd_release_to_test}*.log'))
assert len(build_log) > 0
# take the most recent build log
build_log = sorted(build_log)[0]
......
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