forked from nanocurrency/nano-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9c46a3c
commit 7d61895
Showing
4 changed files
with
49 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,44 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
set -uo pipefail | ||
|
||
source "$(dirname "$BASH_SOURCE")/common.sh" | ||
|
||
BUILD_DIR=${1-${PWD}} | ||
# Path to the nano-node repository can be provided as an argument | ||
# Otherwise parent directory of working directory is assumed | ||
NANO_REPO_DIR=${1:-../} | ||
NANO_SYSTEST_DIR=${NANO_REPO_DIR}/systest | ||
|
||
export NANO_NODE_EXE=${BUILD_DIR}/nano_node$(get_exec_extension) | ||
cd ../systest && ./RUNALL | ||
echo "Running systests from: ${NANO_SYSTEST_DIR}" | ||
|
||
# This assumes that the executables are in the current working directory | ||
export NANO_NODE_EXE=./nano_node$(get_exec_extension) | ||
export NANO_RPC_EXE=./nano_rpc$(get_exec_extension) | ||
|
||
overall_status=0 | ||
|
||
for script in ${NANO_SYSTEST_DIR}/*.sh; do | ||
name=$(basename ${script}) | ||
|
||
echo "::group::Running: $name" | ||
|
||
# Redirecting output to a file to prevent it from being mixed with the output of the action | ||
./$script > "${name}.log" 2>&1 | ||
status=$? | ||
cat "${name}.log" | ||
|
||
echo "::endgroup::" | ||
|
||
if [ $status -eq 0 ]; then | ||
echo "Passed: $name" | ||
else | ||
echo "::error Systest failed: $name ($?)" | ||
overall_status=1 | ||
fi | ||
done | ||
|
||
if [ $overall_status -eq 0 ]; then | ||
echo "::notice::All systests passed" | ||
else | ||
echo "::error::Some systests failed" | ||
exit 1 | ||
fi |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters