From 37d5443be6ed67cd15cc72d6a6d5077e1b26f6f5 Mon Sep 17 00:00:00 2001 From: Eric <5089238+emizzle@users.noreply.github.com> Date: Mon, 20 Jan 2025 12:54:57 +1100 Subject: [PATCH] add constructor param for continuous status update in terminal # Conflicts: # tests/testIntegration.nim --- tests/integration/testmanager.nim | 4 ++++ tests/testIntegration.nim | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/integration/testmanager.nim b/tests/integration/testmanager.nim index daccb1f4..ee5b6779 100644 --- a/tests/integration/testmanager.nim +++ b/tests/integration/testmanager.nim @@ -34,6 +34,9 @@ type # can also be output if a test uses a multinodesuite, requires # CodexConfig.debug to be enabled debugCodexNodes: bool + # Shows test status updates at regular time intervals. Useful for running + # locally while attended. Set to false for unattended runs, eg CI. + showContinuousStatusUpdates: bool timeStart: ?Moment timeEnd: ?Moment codexPortLock: AsyncLock @@ -99,6 +102,7 @@ proc new*( debugTestHarness = false, debugHardhat = false, debugCodexNodes = false, + showContinuousStatusUpdates = false, testTimeout = 60.minutes): TestManager = TestManager( diff --git a/tests/testIntegration.nim b/tests/testIntegration.nim index dfcf4a9c..51ddd3cc 100644 --- a/tests/testIntegration.nim +++ b/tests/testIntegration.nim @@ -44,6 +44,11 @@ proc run() {.async.} = # also be output if a test uses a multinodesuite, requires CodexConfig.debug # to be enabled const debugCodexNodes = true + # Shows test status updates at time intervals. Useful for running locally with + # active terminal interaction. Set to false for unattended runs, eg CI. + const showContinuousStatusUpdates = true + # Timeout duration for EACH integration test file. + const testTimeout = 60.minutes when debugTestHarness and enabledLogLevel != LogLevel.TRACE: styledEcho bgWhite, @@ -70,7 +75,8 @@ More integration test harness logs available by running with debugTestHarness, debugHardhat, debugCodexNodes, - testTimeout = 60.minutes, + showContinuousStatusUpdates, + testTimeout, ) try: trace "starting test manager"