From 71e9ea3204892596360767eb8a0afd4a24170b61 Mon Sep 17 00:00:00 2001 From: iamashwin99 <ashwin-kumar.karnad@mpsd.mpg.de> Date: Fri, 12 May 2023 16:27:58 +0200 Subject: [PATCH] test the presence of build_logs --- tests.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/tests.py b/tests.py index 594f4e4..78e92f6 100644 --- a/tests.py +++ b/tests.py @@ -170,6 +170,20 @@ def test_install_environment(tmp_path): lines = f.read() assert 'zlib' in lines + # 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')) + assert len(build_log) > 0 + # take the most recent build log + build_log = sorted(build_log)[0] + # check that the build log contains statement ##### Installation finished + with open(build_log,'r') as f: + lines = f.read() + assert '##### Installation finished' in lines + + + + def test_interface(tmp_path): pass @@ -177,4 +191,4 @@ def test_interface(tmp_path): # check that the script branch and hash are correct when running the script # check that the help message is printed when no arguments are provided # check that the help message is printed when -h is provided - \ No newline at end of file + # check that the error messages are also logged to the log file \ No newline at end of file -- GitLab