Skip to content
This repository was archived by the owner on Apr 29, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions riscof/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,10 @@ def testlist(ctx,config,work_dir,suite,env):
@click.option('--no-ref-run',is_flag=True,help="Do not run tests on Reference")
@click.option('--no-dut-run',is_flag=True,help="Do not run tests on DUT")
@click.option('--no-clean',is_flag=True,help="Do not clean work directory(if exists).")
@click.option('--gen-sig-header',is_flag=True,help="Run tests on the Reference Model and Generate Signature Header File for the Self-Checking Tests.")
@click.option('--self-check',is_flag=True,help="Self-Checking Mode: Run tests on the DUT using already generated Signature Files.")
@click.pass_context
def run(ctx,config,work_dir,suite,env,no_browser,dbfile,testfile,no_ref_run,no_dut_run,no_clean):
def run(ctx,config,work_dir,suite,env,no_browser,dbfile,testfile,no_ref_run,no_dut_run,no_clean, gen_sig_header, self_check):
exitcode = 0
clean = (testfile is not None or dbfile is not None or no_clean)
setup_directories(work_dir,clean)
Expand Down Expand Up @@ -297,7 +299,7 @@ def run(ctx,config,work_dir,suite,env,no_browser,dbfile,testfile,no_ref_run,no_d
with open(ctx.obj.platform_file, "r") as platfile:
pspecs = platfile.read()

cntr_args = [dbfile,testfile,no_ref_run,no_dut_run]
cntr_args = [dbfile,testfile,no_ref_run,no_dut_run, gen_sig_header, self_check]

report_objects = {}
report_objects['date'] = (datetime.now(
Expand Down
8 changes: 5 additions & 3 deletions riscof/framework/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def run(dut, base, dut_isa_spec, dut_platform_spec, work_dir, cntr_args):
:param dut_platform_spec: The absolute path to the checked yaml containing
the DUT platform specification.

:param cntr_args: dbfile, testfile, no_ref_run, no_dut_run
:param cntr_args: dbfile, testfile, no_ref_run, no_dut_run, gen_sig_file, self_check

:type dut_platform_spec: str

Expand All @@ -194,10 +194,12 @@ def run(dut, base, dut_isa_spec, dut_platform_spec, work_dir, cntr_args):
ispec = utils.load_yaml(dut_isa_spec)
pspec = utils.load_yaml(dut_platform_spec)

if cntr_args[2]:
if cntr_args[2] or cntr_args[5]:
if cntr_args[5]:
logger.info("Running Tests in SELF-CHECKING MODE...")
logger.info("Running Build for DUT")
dut.build(dut_isa_spec, dut_platform_spec)
elif cntr_args[3]:
elif cntr_args[3] or cntr_args[4]:
logger.info("Running Build for Reference")
base.build(dut_isa_spec, dut_platform_spec)
else:
Expand Down
9 changes: 6 additions & 3 deletions riscof/framework/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ def run_tests(dut, base, ispec, pspec, work_dir, cntr_args):

:param pspec: The platform specifications of the DUT.

:param cntr_args: dbfile, testfile, no_ref_run, no_dut_run
:param cntr_args: dbfile, testfile, no_ref_run, no_dut_run, gen_sig_file, self_check

:type ispec: dict

Expand All @@ -433,14 +433,17 @@ def run_tests(dut, base, ispec, pspec, work_dir, cntr_args):
base_test_list[entry]['work_dir'] = os.path.join(node['work_dir'],'ref')
os.makedirs(base_test_list[entry]['work_dir'], exist_ok=True)
results = []
if cntr_args[2]:
if cntr_args[2] or cntr_args[5]:
logger.info("Running Tests on DUT.")
dut.runTests(dut_test_list)
logger.info("Tests run on DUT done.")
raise SystemExit(0)
elif cntr_args[3]:
elif cntr_args[3] or cntr_args[4]:
logger.info("Running Tests on Reference Model.")
base.runTests(base_test_list)
if cntr_args[4]:
base.genSigheader(base.name, test_list)
logger.info("Signature Header File Generated.")
logger.info("Tests run on Reference done.")
raise SystemExit(0)
else:
Expand Down