diff --git a/CHANGELOG.md b/CHANGELOG.md index 4681d80..2740909 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.23.1] - 2021-10-20 +- Improved diff reporting in case of Failed tests. +- Added support for f and d exts in model plugin. +- Added checking to ensure that tests with wrong filtering based on ISA are not selected. +- Fixed spelling for opening and arch test command in docs. + ## [1.23.0] - 2021-10-14 - Added support for new RVTEST_ISA macro - Fixed decode error in Command util. diff --git a/docs/source/arch-tests.rst b/docs/source/arch-tests.rst index 92e3636..d0ad856 100644 --- a/docs/source/arch-tests.rst +++ b/docs/source/arch-tests.rst @@ -5,7 +5,7 @@ Running RISCV-ARCH-TESTS ######################## The following guide provides a walkthrough on how to run the tests available at -the `riscv-arch-tests `_ repository. +the `riscv-arch-test `_ repository. The following assumes you have installed riscof as a cli on your system. If not, then please refer to the :ref:`install_riscof` section for the same. @@ -64,7 +64,7 @@ Cloning the riscv-arch-test repo .. code-block:: console - $ riscof --verbose info arch-tests --clone + $ riscof --verbose info arch-test --clone Running Tests with RISCOF ------------------------- diff --git a/riscof/Templates/setup/model/riscof_model.py b/riscof/Templates/setup/model/riscof_model.py index b75e11b..72c3ff7 100644 --- a/riscof/Templates/setup/model/riscof_model.py +++ b/riscof/Templates/setup/model/riscof_model.py @@ -99,6 +99,10 @@ def build(self, isa_yaml, platform_yaml): self.isa += 'i' if "M" in ispec["ISA"]: self.isa += 'm' + if "F" in ispec["ISA"]: + self.isa += 'f' + if "D" in ispec["ISA"]: + self.isa += 'd' if "C" in ispec["ISA"]: self.isa += 'c' diff --git a/riscof/Templates/style.css b/riscof/Templates/style.css index 4ecdbf5..680ade3 100644 --- a/riscof/Templates/style.css +++ b/riscof/Templates/style.css @@ -85,6 +85,18 @@ span.failed, .failed .col-result { font-weight: bold } +table.diff {font-family:Courier; border:medium;overflow-y:auto;height:150px;} + .diff_header {background-color:#e0e0e0} + .diff thead th { + position: sticky; + top: 0; + } + td.diff_header {text-align:right} + .diff_next {background-color:#c0c0c} + .diff_add {background-color:#aaffaa} + .diff_chg {background-color:#ffff77} + .diff_sub {background-color:#ffaaaa} + #sizes-table { border: 1px solid #cccccc; color: #313131; @@ -121,9 +133,6 @@ span.failed, .failed .col-result { * 2. Extra *------------------*/ -.log:only-child { - height: inherit -} .log { background-color: #e6e6e6; border: 1px solid #e6e6e6; diff --git a/riscof/__init__.py b/riscof/__init__.py index cad8afc..a9b62fb 100644 --- a/riscof/__init__.py +++ b/riscof/__init__.py @@ -4,4 +4,4 @@ __author__ = """InCore Semiconductors Pvt Ltd""" __email__ = 'info@incoresemi.com' -__version__ = '1.23.0' +__version__ = '1.23.1' diff --git a/riscof/cli.py b/riscof/cli.py index 2dbf844..2a5c2a5 100644 --- a/riscof/cli.py +++ b/riscof/cli.py @@ -345,7 +345,7 @@ def run(ctx,config,work_dir,suite,env,no_browser,dbfile,testfile,no_ref_run,no_d if not no_browser: try: import webbrowser - logger.info("Openning test report in web-browser") + logger.info("Opening test report in web-browser") webbrowser.open(reportfile) raise SystemExit(exitcode) except: @@ -437,7 +437,7 @@ def coverage(ctx,config,work_dir,suite,env,no_browser,cgf_file): if not no_browser: try: import webbrowser - logger.info("Openning test report in web-browser") + logger.info("Opening test report in web-browser") webbrowser.open(reportfile) except: raise SystemExit(0) diff --git a/riscof/framework/test.py b/riscof/framework/test.py index decdef0..4db6272 100644 --- a/riscof/framework/test.py +++ b/riscof/framework/test.py @@ -42,8 +42,9 @@ def compare_signature(file1, file2): logger.error('Signature file : ' + file1 + ' does not exist') raise SystemExit(1) file1_lines = open(file1, "r").readlines() + file2_lines = open(file2, "r").readlines() res = ("".join( - difflib.unified_diff(file1_lines,open(file2, "r").readlines(), file1, file2))).strip() + difflib.unified_diff(file1_lines,file2_lines, file1, file2))).strip() if res == "": if len(file1_lines)==0: return 'Failed', '---- \nBoth FIles empty\n' @@ -51,6 +52,8 @@ def compare_signature(file1, file2): status = 'Passed' else: status = 'Failed' + res = difflib.HtmlDiff(tabsize=4).make_table(file1_lines,file2_lines,file1,file2, + context=True, numlines=0) return status, res def get_node(spec,node): @@ -276,17 +279,21 @@ def prod_isa(dut_isa, test_isa): dut_exts = isa_set(re.sub("RV(64|128|32)(I|E)","",dut_isa)) isa = set([]) last_prefix = '' + atleast_1 = False for entry in test_isa: match = re.findall("(?PRV(64|128|32)(I|E))",entry) prefix = match[0][0] exts = isa_set(re.sub("RV(64|128|32)(I|E)","",entry)) overlap = dut_exts & exts if overlap == exts: + atleast_1 = True isa = isa | overlap if last_prefix: if last_prefix != prefix: raise TestSelectError("Incompatiple prefix for valid ISA strings in test.") last_prefix = prefix + if not atleast_1: + raise TestSelectError("Test Selected without the relevant extensions being available on DUT.") return prefix+canonicalise(isa) def generate_test_pool(ispec, pspec, workdir, dbfile = None): @@ -446,7 +453,7 @@ def run_tests(dut, base, ispec, pspec, work_dir, cntr_args): testentry['commit_id'], 'log': 'commit_id:' + testentry['commit_id'] + "\nMACROS:\n" + "\n".join(testentry['macros']) + - "" if result == "Passed" else diff, + ("" if result == "Passed" else diff), 'path': work_dir, 'repclass': diff --git a/setup.cfg b/setup.cfg index c5555e9..38819c6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.23.0 +current_version = 1.23.1 commit = True tag = True diff --git a/setup.py b/setup.py index b35b6eb..a3beb67 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ def read_requires(): test_requirements = [ ] setup(name="riscof", - version='1.23.0', + version='1.23.1', description="RISC-V Architectural Test Framework", long_description=readme + '\n\n', classifiers=[