Skip to content

Commit

Permalink
TrickOps: Revert changes to trickops test yml file from Sept 2023
Browse files Browse the repository at this point in the history
* trick_sims.yml was "accidentally changed" to remove unstable sims
  in Sept 2023, breaking the TrickOps unit tests. This reverts that change.
* Adjust new hashlib md5 comparison approach to work on systems where
  'usedforsecurity' isn't supported
  • Loading branch information
Dan Jordan committed Mar 28, 2024
1 parent 2099842 commit 3012a9c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
7 changes: 5 additions & 2 deletions share/trick/trickops/TrickWorkflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -1284,8 +1284,11 @@ def compare(self):
self.status = Job.Status.FAILED
if self.missing:
return self.status
if (hashlib.md5(open(self.test_data,'rb').read(), usedforsecurity=False).hexdigest() !=
hashlib.md5(open(self.baseline_data,'rb').read(), usedforsecurity=False).hexdigest()):
td = hashlib.new('md5', usedforsecurity=False)
bd = hashlib.new('md5', usedforsecurity=False)
td.update(open(self.test_data,'rb').read())
bd.update(open(self.baseline_data,'rb').read())
if (td.hexdigest() != bd.hexdigest()):
self.status = Job.Status.FAILED
else:
self.status = Job.Status.SUCCESS
Expand Down
16 changes: 8 additions & 8 deletions share/trick/trickops/tests/trick_sims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,12 @@ SIM_test_templates:
- unit_test
runs:
RUN_test/unit_test.py:
# SIM_test_varserv:
# path: test/SIM_test_varserv
# labels:
# - unit_test
# runs:
# RUN_test/unit_test.py:
SIM_test_varserv:
path: test/SIM_test_varserv
labels:
- unit_test
runs:
RUN_test/unit_test.py:
SIM_threads:
path: test/SIM_threads
labels:
Expand Down Expand Up @@ -189,8 +189,8 @@ SIM_ball_L2:
runs:
SIM_ball_L3:
path: trick_sims/Ball/SIM_ball_L3
# SIM_amoeba:
# path: trick_sims/Cannon/SIM_amoeba
SIM_amoeba:
path: trick_sims/Cannon/SIM_amoeba
SIM_cannon_aero:
path: trick_sims/Cannon/SIM_cannon_aero
SIM_cannon_analytic:
Expand Down

0 comments on commit 3012a9c

Please sign in to comment.