Skip to content

Commit

Permalink
Merge pull request #1131 from sstsimulator/devel
Browse files Browse the repository at this point in the history
Automatically Merged using SST Master Branch Merger
  • Loading branch information
sst-autotester authored Sep 18, 2024
2 parents 0075ba1 + 312d1df commit cd569ef
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/PR_clang-format_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:

# Running the github action for clang format
- name: Run Action clang-format-lint
uses: DoozyX/clang-format-lint-action@v0.12
uses: DoozyX/clang-format-lint-action@c71d0bf4e21876ebec3e5647491186f8797fde31 # v0.18.2
with:
source: './sst-core_source/'
exclude: './sst-core_source/src/sst/core/libltdl ./sst-core_source/external ./sst-core_source/build'
Expand Down
11 changes: 9 additions & 2 deletions src/sst/core/testingframework/test_engine_unittest.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,14 @@
import traceback
import threading
import time
from datetime import datetime
import datetime

if sys.version_info.minor >= 11:
def get_current_time():
return datetime.datetime.now(datetime.UTC)
else:
def get_current_time():
return datetime.datetime.utcnow()

################################################################################

Expand Down Expand Up @@ -324,7 +331,7 @@ def startTest(self, test):
else:
self._testcase_name = "FailedTest"
self._testsuite_name = "FailedTest"
timestamp = datetime.utcnow().strftime("%Y_%m%d_%H:%M:%S.%f utc")
timestamp = get_current_time().strftime("%Y_%m%d_%H:%M:%S.%f utc")
self._junit_test_case = JUnitTestCase(self._test_name,
self._testcase_name,
timestamp=timestamp)
Expand Down
12 changes: 8 additions & 4 deletions tests/testsuite_default_RealTime.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
# - SIGINT / SIGTERM
# --exit-after option
# --heartbeat-wall-period option
#
# Notes:
# - signal_sec=1 is too small to be reliably caught on some of the VMs
# and containers.
################################################################################

class testcase_Signals(SSTTestCase):
Expand All @@ -50,7 +54,7 @@ def test_RealTime_SIGUSR1(self):
# Run test
sdlfile = "{0}/test_RealTime.py".format(testsuitedir)
outfile = "{0}/test_RealTime_SIGUSR1.out".format(outdir)
self.run_sst(sdlfile, outfile, other_args="--exit-after=4", send_signal=signal.SIGUSR1, signal_sec=1)
self.run_sst(sdlfile, outfile, other_args="--exit-after=10", send_signal=signal.SIGUSR1, signal_sec=5)

line_count = 0
exit_count = 0
Expand Down Expand Up @@ -79,7 +83,7 @@ def test_RealTime_SIGUSR2(self):
# Run test
sdlfile = "{0}/test_RealTime.py".format(testsuitedir)
outfile = "{0}/test_RealTime_SIGUSR2.out".format(outdir)
self.run_sst(sdlfile, outfile, other_args="--exit-after=4", send_signal=signal.SIGUSR2, signal_sec=1)
self.run_sst(sdlfile, outfile, other_args="--exit-after=10", send_signal=signal.SIGUSR2, signal_sec=5)

line_count = 0
exit_count = 0
Expand Down Expand Up @@ -108,7 +112,7 @@ def test_RealTime_SIGINT(self):
# Run test
sdlfile = "{0}/test_RealTime.py".format(testsuitedir)
outfile = "{0}/test_RealTime_SIGINT.out".format(outdir)
self.run_sst(sdlfile, outfile, other_args="--exit-after=4", send_signal=signal.SIGINT, signal_sec=1)
self.run_sst(sdlfile, outfile, other_args="--exit-after=10", send_signal=signal.SIGINT, signal_sec=5)

line_count = 0
exit_count = 0
Expand Down Expand Up @@ -137,7 +141,7 @@ def test_RealTime_SIGTERM(self):
# Run test
sdlfile = "{0}/test_RealTime.py".format(testsuitedir)
outfile = "{0}/test_RealTime_SIGTERM.out".format(outdir)
self.run_sst(sdlfile, outfile, other_args="--exit-after=4", send_signal=signal.SIGTERM, signal_sec=1)
self.run_sst(sdlfile, outfile, other_args="--exit-after=10", send_signal=signal.SIGTERM, signal_sec=5)

line_count = 0
exit_count = 0
Expand Down

0 comments on commit cd569ef

Please sign in to comment.