Skip to content

Commit

Permalink
Merge pull request #17 from edwin7026/self_check_bug_fixes
Browse files Browse the repository at this point in the history
Self check bug fixes
  • Loading branch information
neelgala authored Apr 16, 2024
2 parents d33109d + 6562b31 commit 0ed20e0
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.4.3] - 2024-04-16
- bug fixes; instruction count functionality added to self-checks

## [1.4.2] - 2024-01-18
- bug fixes pertaining to self-checking

Expand Down
2 changes: 1 addition & 1 deletion river_core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

__author__ = """InCore Semiconductors"""
__email__ = '[email protected]'
__version__ = '1.4.2'
__version__ = '1.4.3'
6 changes: 4 additions & 2 deletions river_core/rivercore.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,8 @@ def rivercore_compile(config_file, test_list, coverage, verbosity, dut_flags,
ref_json_data = []
for test, attr in test_dict.items():
test_wd = attr['work_dir']
if not attr['self_checking']:
is_self_checking = attr['self_checking']
if not is_self_checking:
if not os.path.isfile(test_wd + '/dut.dump'):
logger.error(f'{test:<30} : DUT dump is missing')
test_dict[test]['result'] = 'Unavailable'
Expand All @@ -635,9 +636,10 @@ def rivercore_compile(config_file, test_list, coverage, verbosity, dut_flags,
success = False
continue
result, log = utils.self_check(test_wd + '/dut.signature')
insnsize = utils.get_file_size(test_wd + '/dut.dump')
test_dict[test]['num_instr'] = insnsize
test_dict[test]['result'] = result
test_dict[test]['log'] = log
test_dict[test]['num_instr'] = insnsize
if result == 'Passed':
logger.info(f"{test:<30} : TEST {result.upper()}")
else:
Expand Down
8 changes: 8 additions & 0 deletions river_core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ def self_check(file1):
rout = f'\nLine:{lineno} has a non-zero value indicating a fail'
return result, rout

def get_file_size(file):
'''
Function to give the number of lines
'''
with open(f'{file}','r') as fd:
rcount = len(fd.readlines())
return rcount

def compare_signature(file1, file2):
'''
Function to check whether two signature files are equivalent. This funcion uses the
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.4.2
current_version = 1.4.3
commit = True
tag = True

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ def read_requires():
tests_require=test_requirements,
url=
'https://github.com/incoresemi/river_core',
version='1.4.2',
version='1.4.3',
zip_safe=False,
)

0 comments on commit 0ed20e0

Please sign in to comment.