umockdev-tests: Still raise an error when storing the exception output

Otherwise we won't ever fail
This commit is contained in:
Marco Trevisan (Treviño) 2020-12-09 01:20:10 +01:00 committed by Benjamin Berg
parent f2ea3e784e
commit 8112da0358

View file

@ -87,10 +87,11 @@ try:
if os.path.exists(os.path.join(ddir, "custom.ioctl")): if os.path.exists(os.path.join(ddir, "custom.ioctl")):
custom() custom()
except: except Exception as e:
# Store created output files for inspection (in the build directory) # Store created output files for inspection (in the build directory)
outdir = os.path.join('errors', os.path.basename(ddir)) outdir = os.path.join('errors', os.path.basename(ddir))
shutil.copytree(tmpdir, outdir) shutil.copytree(tmpdir, outdir)
raise e
finally: finally:
shutil.rmtree(tmpdir) shutil.rmtree(tmpdir)