mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-21 22:09:23 +01:00
test-runner: don't copy __pycache__ in tests
This is created by the python interpreter for speed optimization but poses problems if copied to /tmp since previous tests may have already copied it leading to an exception.
This commit is contained in:
parent
d6d481210e
commit
eb84b2a6e8
@ -1296,7 +1296,8 @@ def pre_test(ctx, test, copied):
|
||||
subtests = [f for f in files if f.startswith('test') or \
|
||||
os.path.splitext(f)[0].endswith('test')]
|
||||
# Everything else (except .py files)
|
||||
to_copy = [f for f in list(set(files) - set(subtests)) if not f.endswith('.py')]
|
||||
to_copy = [f for f in list(set(files) - set(subtests)) if not f.endswith('.py') \
|
||||
and f != '__pycache__']
|
||||
for f in to_copy:
|
||||
if os.path.isdir(f):
|
||||
shutil.copytree(f, '/tmp/' + f)
|
||||
|
Loading…
Reference in New Issue
Block a user