From 29968fcc58941436bbbb71286f70215a86a82aa9 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Mon, 6 Feb 2017 21:50:57 +0100 Subject: [PATCH] Add docs for "wait" option, more config checking --- docs/source/reference.rst | 4 ++++ sbysrc/sby_core.py | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/source/reference.rst b/docs/source/reference.rst index cc2bf53..31d78bf 100644 --- a/docs/source/reference.rst +++ b/docs/source/reference.rst @@ -34,6 +34,10 @@ options are: +-------------+-----------+---------------------------------------------------------+ | ``timeout`` | All | Timeout in seconds. Default: ``none`` (i.e. no timeout) | +-------------+-----------+---------------------------------------------------------+ +| ``wait`` | All | Instead of terminating when the first engine returns, | +| | | wait for all engines to return and check for | +| | | consistency. Values: ``on``, ``off``. Default: ``off`` | ++-------------+-----------+---------------------------------------------------------+ | ``depth`` | ``bmc``, | Depth of the bounded model check. Only the specified | | | ``cover`` | number of cycles are considered. Default: ``20`` | | +-----------+---------------------------------------------------------+ diff --git a/sbysrc/sby_core.py b/sbysrc/sby_core.py index 01723d3..9a7da46 100644 --- a/sbysrc/sby_core.py +++ b/sbysrc/sby_core.py @@ -129,9 +129,7 @@ class SbyJob: self.files = dict() self.models = dict() self.workdir = workdir - self.status = "UNKNOWN" - self.expect = ["PASS"] self.tasks_running = [] self.tasks_all = [] @@ -363,12 +361,18 @@ class SbyJob: def run(self): assert "mode" in self.options + assert self.options["mode"] in ["bmc", "prove", "cover"] + self.expect = ["PASS"] if "expect" in self.options: self.expect = self.options["expect"].upper().split(",") + for s in self.expect: + assert s in ["PASS", "FAIL", "UNKNOWN", "ERROR", "TIMEOUT"] + self.waitmode = False if "wait" in self.options: + assert self.options["wait"] in ["on", "off"] self.waitmode = self.options["wait"] == "on" self.copy_src() -- 2.30.2