[Ezbench-dev] [PATCH 2/7] smartezbench: do not default to 1 round if rounds is None in add_testset
Martin Peres
martin.peres at linux.intel.com
Mon Mar 6 13:02:39 UTC 2017
---
ezbench | 7 ++++++-
python-modules/ezbench/smartezbench.py | 7 +------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/ezbench b/ezbench
index f0f379d..25fa7cf 100755
--- a/ezbench
+++ b/ezbench
@@ -203,10 +203,15 @@ if args.commits is not None and len(testsets_to_be_added) > 0:
if not run_info.success():
sys.exit(1)
+ # Default to 1 round if -r is not set
+ rounds = int(args.rounds)
+ if rounds is None:
+ rounds = 1
+
# Add the testsets specified
for commit in run_info.commits:
for testset in testsets_to_be_added:
- sbench.add_testset(commit, testset, args.rounds)
+ sbench.add_testset(commit, testset, rounds)
if args.command is not None:
if args.command == "start":
diff --git a/python-modules/ezbench/smartezbench.py b/python-modules/ezbench/smartezbench.py
index 6436d0b..44fd4a0 100644
--- a/python-modules/ezbench/smartezbench.py
+++ b/python-modules/ezbench/smartezbench.py
@@ -513,14 +513,9 @@ class SmartEzbench:
self.__save_state()
self.__release_lock()
- def add_testset(self, commit, testset, rounds = None):
+ def add_testset(self, commit, testset, rounds = 1):
self.__reload_state(keep_lock=True)
- if rounds is None:
- rounds = 1
- else:
- rounds = int(rounds)
-
self.__log(Criticality.II, "Add the testset {} ({} tests)".format(testset.name,
len(testset)))
--
2.11.1
More information about the Ezbench-dev
mailing list