[Piglit] [PATCH] framework/programs/run.py: Allow comments in test-list files.
Petri Latvala
petri.latvala at intel.com
Mon Oct 17 09:52:36 UTC 2016
IGT testing in Intel's CI is using a static list of tests to
run. Commenting out tests and annotating them will help
human-readability.
Signed-off-by: Petri Latvala <petri.latvala at intel.com>
---
Possible duplicate, I didn't see this arrive on the mailing list myself
framework/programs/run.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/framework/programs/run.py b/framework/programs/run.py
index ecfc36f..7921816 100644
--- a/framework/programs/run.py
+++ b/framework/programs/run.py
@@ -325,8 +325,9 @@ def run(input_):
# If a test list is provided then set the forced_test_list value.
if args.test_list:
with open(args.test_list) as test_list:
- # Strip newlines
- profile.forced_test_list = list([t.strip() for t in test_list])
+ # Strip newlines and comments, ignore empty lines
+ stripped = [t.split('#')[0].strip() for t in test_list]
+ profile.forced_test_list = list(filter(None, stripped))
results.time_elapsed.start = time.time()
# Set the dmesg type
--
2.9.3
More information about the Piglit
mailing list