diff options
author | Zachary Turner <zturner@google.com> | 2015-12-08 01:15:30 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2015-12-08 01:15:30 +0000 |
commit | 606e3a5221ec611a2f5da6d9a4961e8e2199f9d2 (patch) | |
tree | a71b819581216c1153340efce0baafd6a7da6941 /lldb/packages/Python/lldbsuite/test/benchmarks/expression/TestRepeatedExprs.py | |
parent | da30cff9ef2e22cf9e8e307f132976a15feacdf8 (diff) | |
download | bcm5719-llvm-606e3a5221ec611a2f5da6d9a4961e8e2199f9d2.tar.gz bcm5719-llvm-606e3a5221ec611a2f5da6d9a4961e8e2199f9d2.zip |
Get rid of global variables in dotest.py
This moves all the global variables into a separate module called
`configuration`. This has a number of advantages:
1. Configuration data is centrally maintained so it's easy to get
a high level overview of what configuration data the test suite
makes use of.
2. The method of sharing configuration data among different parts
of the test suite becomes standardized. Previously we would
put some things into the `lldb` module, some things into the
`lldbtest_config` module, and some things would not get shared.
Now everything is shared through one module and is available to
the entire test suite.
3. It opens the door to moving some of the initialization code into
the `configuration` module, simplifying the implementation of
`dotest.py`.
There are a few stragglers that didn't get converted over to using
the `configuration` module in this patch, because it would have grown
the size of the patch unnecessarily. This includes everything
currently in the `lldbtest_config` module, as well as the
`lldb.remote_platform` variable. We can address these in the future.
llvm-svn: 254982
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/benchmarks/expression/TestRepeatedExprs.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/benchmarks/expression/TestRepeatedExprs.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/benchmarks/expression/TestRepeatedExprs.py b/lldb/packages/Python/lldbsuite/test/benchmarks/expression/TestRepeatedExprs.py index fb629ff27bb..223561eb420 100644 --- a/lldb/packages/Python/lldbsuite/test/benchmarks/expression/TestRepeatedExprs.py +++ b/lldb/packages/Python/lldbsuite/test/benchmarks/expression/TestRepeatedExprs.py @@ -6,6 +6,7 @@ from __future__ import print_function import os, sys import lldb +from lldbsuite.test import configuration from lldbsuite.test.lldbbench import * class RepeatedExprsCase(BenchBase): @@ -18,7 +19,7 @@ class RepeatedExprsCase(BenchBase): self.line_to_break = line_number(self.source, '// Set breakpoint here.') self.lldb_avg = None self.gdb_avg = None - self.count = lldb.bmIterationCount + self.count = configuration.bmIterationCount if self.count <= 0: self.count = 100 |