]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
suite,report: initialize seed with None 1200/head
authorKefu Chai <kchai@redhat.com>
Tue, 7 Aug 2018 16:23:18 +0000 (16:23 +0000)
committerKefu Chai <kchai@redhat.com>
Tue, 7 Aug 2018 16:26:22 +0000 (16:26 +0000)
so we can set it if it is not initialized

Signed-off-by: Kefu Chai <kchai@redhat.com>
teuthology/report.py
teuthology/suite/__init__.py

index d62f4785312ec0de824b5335314563b65444b541..8f37a97e7ff68f70e9d7c78ccf1d3d12f4e44067 100644 (file)
@@ -394,7 +394,7 @@ class ResultsReporter(object):
         log_path = os.path.join(self.archive_base, run_name, 'results.log')
         # parse the log file generated by teuthology.results.results()
         subset = None
-        seed = -1
+        seed = None
         with file(log_path) as results_log:
             for line in results_log:
                 if ':' not in line:
index 363c2f123ec3a0aa3c2c4b3df43ef1ff5ec1b36d..52882962ad787bf487663c54baa8b272c0c3e18a 100644 (file)
@@ -112,7 +112,7 @@ def get_rerun_filters(name, statuses):
 def get_rerun_conf(conf):
     reporter = ResultsReporter()
     subset, seed = reporter.get_rerun_conf(conf.rerun)
-    if seed < 0:
+    if seed is None:
         return conf.subset, conf.seed
     if conf.seed < 0:
         log.info('Using stored seed=%s', seed)