From: James Prestwood <prestwoj at gmail.com>
To: iwd at lists.01.org
Subject: [PATCH 3/3] test-runner: don't copy __pycache__ in tests
Date: Tue, 04 Jan 2022 09:37:36 -0800 [thread overview]
Message-ID: <20220104173736.93682-3-prestwoj@gmail.com> (raw)
In-Reply-To: 20220104173736.93682-1-prestwoj@gmail.com
[-- Attachment #1: Type: text/plain, Size: 899 bytes --]
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.
---
tools/test-runner | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/test-runner b/tools/test-runner
index 4f16bd65..c35466c1 100755
--- a/tools/test-runner
+++ b/tools/test-runner
@@ -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)
--
2.31.1
reply other threads:[~2022-01-04 17:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220104173736.93682-3-prestwoj@gmail.com \
--to=iwd@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox