Windows run tests using bash scripts

This commit is contained in:
Piotr Wójcik 2023-04-27 21:29:04 +02:00
commit a802590634
6 changed files with 42 additions and 8 deletions

View file

@ -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

16
ci/tests/common.sh Normal file
View file

@ -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
}

View file

@ -1,6 +1,8 @@
#!/bin/bash
set -euo pipefail
source "$(dirname "$BASH_SOURCE")/common.sh"
BUILD_DIR=${1-${PWD}}
${BUILD_DIR}/core_test
${BUILD_DIR}/core_test$(get_exec_extension)

View file

@ -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
xvfb_run_ ${BUILD_DIR}/qt_test$(get_exec_extension)

View file

@ -1,6 +1,8 @@
#!/bin/bash
set -euo pipefail
source "$(dirname "$BASH_SOURCE")/common.sh"
BUILD_DIR=${1-${PWD}}
${BUILD_DIR}/rpc_test
${BUILD_DIR}/rpc_test$(get_exec_extension)

View file

@ -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