mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-01-06 15:33:06 +00:00
Allow parallel integration tests to be disabled
Disable with `make ENABLE_PARALLEL_TESTS=0 testIntegration`
This commit is contained in:
parent
0c680dcefc
commit
f0e66df3f7
6
.github/workflows/ci-reusable.yml
vendored
6
.github/workflows/ci-reusable.yml
vendored
@ -63,7 +63,7 @@ jobs:
|
||||
npm install
|
||||
|
||||
- name: Run Ethereum node with Codex contracts
|
||||
if: matrix.tests == 'contract' || matrix.tests == 'tools' || matrix.tests == 'all'
|
||||
if: matrix.tests == 'contract' || matrix.tests == 'integration' || matrix.tests == 'tools' || matrix.tests == 'all'
|
||||
working-directory: vendor/codex-contracts-eth
|
||||
env:
|
||||
MSYS2_PATH_TYPE: inherit
|
||||
@ -82,6 +82,10 @@ jobs:
|
||||
if: matrix.tests == 'integration' || matrix.tests == 'all'
|
||||
env:
|
||||
CODEX_INTEGRATION_TEST_INCLUDES: ${{ matrix.includes }}
|
||||
run: make -j${ncpu} ENABLE_PARALLEL_TESTS=0 testIntegration
|
||||
|
||||
- name: Parallel integration tests
|
||||
if: matrix.tests == 'integration-parallel'
|
||||
run: make -j${ncpu} DEBUG_CODEXNODES=1 DEBUG_TESTHARNESS=1 DEBUG_UPDATES=1 testIntegration
|
||||
|
||||
- name: Upload integration tests log files
|
||||
|
||||
3
Makefile
3
Makefile
@ -156,6 +156,9 @@ endif
|
||||
ifdef TEST_TIMEOUT
|
||||
TEST_PARAMS := $(TEST_PARAMS) -d:TestTimeout=$(TEST_TIMEOUT)
|
||||
endif
|
||||
ifdef ENABLE_PARALLEL_TESTS
|
||||
TEST_PARAMS := $(TEST_PARAMS) -d:EnableParallelTests=$(ENABLE_PARALLEL_TESTS)
|
||||
endif
|
||||
|
||||
# Builds and runs the integration tests
|
||||
testIntegration: | build deps
|
||||
|
||||
@ -55,6 +55,7 @@ task testIntegration, "Run integration tests":
|
||||
for i in 2 ..< paramCount():
|
||||
if "DebugTestHarness" in paramStr(i) and truthy paramStr(i).split('=')[1]:
|
||||
testParams = "-d:chronicles_log_level=TRACE -d:chronicles_sinks=textlines[stdout]"
|
||||
break
|
||||
test "testIntegration", params = testParams
|
||||
# use params to enable logging from the integration test executable
|
||||
# test "testIntegration", params = "-d:chronicles_sinks=textlines[notimestamps,stdout],textlines[dynamic] " &
|
||||
|
||||
@ -37,6 +37,8 @@ const ShowContinuousStatusUpdates {.booldefine.} = false
|
||||
# Timeout duration (in mimutes) for EACH integration test file.
|
||||
const TestTimeout {.intdefine.} = 60
|
||||
|
||||
const EnableParallelTests {.booldefine.} = true
|
||||
|
||||
proc run() {.async.} =
|
||||
when DebugTestHarness and enabledLogLevel != LogLevel.TRACE:
|
||||
styledEcho bgWhite,
|
||||
@ -81,4 +83,17 @@ proc run() {.async.} =
|
||||
if not wasSuccessful:
|
||||
quit(1) # indicate with a non-zero exit code that the tests failed
|
||||
|
||||
waitFor run()
|
||||
when EnableParallelTests:
|
||||
waitFor run()
|
||||
else:
|
||||
# run tests serially
|
||||
import ./integration/testcli
|
||||
import ./integration/testrestapi
|
||||
import ./integration/testupdownload
|
||||
import ./integration/testsales
|
||||
import ./integration/testpurchasing
|
||||
import ./integration/testblockexpiration
|
||||
import ./integration/testmarketplace
|
||||
import ./integration/testproofs
|
||||
import ./integration/testvalidator
|
||||
import ./integration/testecbug
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user