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.
pull/417/head
Nirbheek Chauhan 9 years ago
parent 6660837953
commit cc4826b85f
  1. 10
      run_tests.py

@ -144,15 +144,17 @@ def platform_fix_exe_name(fname):
return fname return fname
def validate_install(srcdir, installdir): def validate_install(srcdir, installdir):
# List of installed files
info_file = os.path.join(srcdir, 'installed_files.txt') 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 = {} expected = {}
found = {} found = {}
ret_msg = '' 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 # 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): for line in open(info_file):
expected[platform_fix_exe_name(line.strip())] = False expected[platform_fix_exe_name(line.strip())] = False
# Check if expected files were found # Check if expected files were found

Loading…
Cancel
Save