From cc4826b85f3e3ddf209553f579dd567769ceebfb Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Wed, 13 Jul 2016 01:17:44 +0530 Subject: [PATCH] run_tests.py: Make 'no-installed-files' stricter When the file 'no-installed-files' is installed, require that the test not install any other files. A test for this is pending. --- run_tests.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/run_tests.py b/run_tests.py index 1130badd4..0919d847a 100755 --- a/run_tests.py +++ b/run_tests.py @@ -144,15 +144,17 @@ def platform_fix_exe_name(fname): return fname def validate_install(srcdir, installdir): + # List of installed files info_file = os.path.join(srcdir, 'installed_files.txt') + # If this exists, the test does not install any other files + noinst_file = 'usr/no-installed-files' expected = {} found = {} ret_msg = '' - # Test expects to not install any files - if os.path.exists(os.path.join(installdir, 'usr', 'no-installed-files')): - return '' # Generate list of expected files - if os.path.exists(info_file): + if os.path.exists(os.path.join(installdir, noinst_file)): + expected[noinst_file] = False + elif os.path.exists(info_file): for line in open(info_file): expected[platform_fix_exe_name(line.strip())] = False # Check if expected files were found