diff --git a/tests.py b/tests.py index 594f4e450225710467f2b9aa73ed936b56e3200b..78e92f66e7d1a4e0f2aa16de0bc2bbfd4a465098 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