If test exes can not be removed (because e.g. an antivirus program holds on to the file), just leave them behind. Closes #378.

pull/381/head
Jussi Pakkanen 9 years ago
parent 4b3c43649e
commit 6a3e29ccd4
  1. 6
      mesonbuild/compilers.py

@ -437,7 +437,13 @@ int someSymbolHereJustForFun;
se = se.decode() se = se.decode()
mlog.debug('Program stdout:\n', so) mlog.debug('Program stdout:\n', so)
mlog.debug('Program stderr:\n', se) mlog.debug('Program stderr:\n', se)
try:
os.remove(exename) os.remove(exename)
except PermissionError:
# On Windows antivirus programs and the like hold
# on to files so they can't be deleted. There's not
# much to do in this case.
pass
return RunResult(True, pe.returncode, so, se) return RunResult(True, pe.returncode, so, se)
def cross_sizeof(self, element, prefix, env, extra_args=[]): def cross_sizeof(self, element, prefix, env, extra_args=[]):

Loading…
Cancel
Save