summaryrefslogtreecommitdiff
path: root/framework/programs
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2016-10-14 16:40:07 -0700
committerDylan Baker <dylan@pnwbakers.com>2016-11-10 10:51:02 -0800
commit0cd6901655a1491d82c6bec216dce7ccdf4f4e29 (patch)
tree47050955e002b887e118266b88219fcd3a749302 /framework/programs
parentd3cf9064e44af40a306244669b45070f98808a2a (diff)
framework/profile: Don't alter the TestProfile before running
This patch changes the way that the tests from TestProfile are processed. Rather than having a process_test_list method that modifies TestProfile.test_list, a new itertests() method creates an iterator that yields tests that are not excluded by filters. This saves a bit of code, increases the memory usage, and reduces surprise. It would be nice if there wasn't a need to create a concrete test list, but there wouldn't be any way to get the number of tests otherwise. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Diffstat (limited to 'framework/programs')
-rw-r--r--framework/programs/print_commands.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/framework/programs/print_commands.py b/framework/programs/print_commands.py
index 5811cd2b1..8accb2bfe 100644
--- a/framework/programs/print_commands.py
+++ b/framework/programs/print_commands.py
@@ -97,8 +97,7 @@ def main(input_):
piglit_dir = os.path.dirname(os.path.realpath(sys.argv[0]))
os.chdir(piglit_dir)
- profile_.prepare_test_list()
- for name, test in six.iteritems(profile_.test_list):
+ for name, test in profile_.itertests():
assert isinstance(test, Test)
print(args.format_string.format(
name=name,