diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 391457102..80fa0c3d7 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -182,7 +182,17 @@ jobs: path: build key: ${{ runner.os }}-build-cache - - name: Run Tests [TEST_USE_ROCKSDB=${{ env.TEST_USE_ROCKSDB }}] - run: ci/actions/windows/run.ps1 - env: - DEADLINE_SCALE_FACTOR: ${{ env.TEST_USE_ROCKSDB == 1 && '2' || '1' }} + - name: Core Tests + if: steps.build.outcome == 'success' && (success() || failure()) + run: cd build && ../ci/tests/run-core-tests.sh + shell: bash + + - name: RPC Tests + if: steps.build.outcome == 'success' && (success() || failure()) + run: cd build && ../ci/tests/run-rpc-tests.sh + shell: bash + + - name: System Tests + if: steps.build.outcome == 'success' && (success() || failure()) + run: cd build && ../ci/tests/run-system-tests.sh + shell: bash \ No newline at end of file diff --git a/ci/tests/common.sh b/ci/tests/common.sh new file mode 100644 index 000000000..03d464a1a --- /dev/null +++ b/ci/tests/common.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +get_exec_extension() { + case "$(uname -s)" in + Linux*|Darwin*) + echo "" + ;; + CYGWIN*|MINGW32*|MSYS*|MINGW*) + echo ".exe" + ;; + *) + echo "Unknown OS" + exit 1 + ;; + esac +} \ No newline at end of file diff --git a/ci/tests/run-core-tests.sh b/ci/tests/run-core-tests.sh index e2d561363..a3e02b70b 100755 --- a/ci/tests/run-core-tests.sh +++ b/ci/tests/run-core-tests.sh @@ -1,6 +1,8 @@ #!/bin/bash set -euo pipefail +source "$(dirname "$BASH_SOURCE")/common.sh" + BUILD_DIR=${1-${PWD}} -${BUILD_DIR}/core_test \ No newline at end of file +${BUILD_DIR}/core_test$(get_exec_extension) \ No newline at end of file diff --git a/ci/tests/run-qt-tests.sh b/ci/tests/run-qt-tests.sh index caceb686a..8faa28d43 100755 --- a/ci/tests/run-qt-tests.sh +++ b/ci/tests/run-qt-tests.sh @@ -1,6 +1,8 @@ #!/bin/bash set -euo pipefail +source "$(dirname "$BASH_SOURCE")/common.sh" + BUILD_DIR=${1-${PWD}} # Alpine doesn't offer an xvfb @@ -18,4 +20,4 @@ xvfb_run_() return ${res} } -xvfb_run_ ${BUILD_DIR}/qt_test \ No newline at end of file +xvfb_run_ ${BUILD_DIR}/qt_test$(get_exec_extension) \ No newline at end of file diff --git a/ci/tests/run-rpc-tests.sh b/ci/tests/run-rpc-tests.sh index d62ee5dee..6b64607d9 100755 --- a/ci/tests/run-rpc-tests.sh +++ b/ci/tests/run-rpc-tests.sh @@ -1,6 +1,8 @@ #!/bin/bash set -euo pipefail +source "$(dirname "$BASH_SOURCE")/common.sh" + BUILD_DIR=${1-${PWD}} -${BUILD_DIR}/rpc_test \ No newline at end of file +${BUILD_DIR}/rpc_test$(get_exec_extension) \ No newline at end of file diff --git a/ci/tests/run-system-tests.sh b/ci/tests/run-system-tests.sh index 2fc71f42b..e5e539453 100755 --- a/ci/tests/run-system-tests.sh +++ b/ci/tests/run-system-tests.sh @@ -1,7 +1,9 @@ #!/bin/bash set -euo pipefail +source "$(dirname "$BASH_SOURCE")/common.sh" + BUILD_DIR=${1-${PWD}} -export NANO_NODE_EXE=${BUILD_DIR}/nano_node +export NANO_NODE_EXE=${BUILD_DIR}/nano_node$(get_exec_extension) cd ../systest && ./RUNALL \ No newline at end of file