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.
Merge branch 'develop' into networking-fixes/daemon-latch-rebased
- Loading branch information
Showing
89 changed files
with
935 additions
and
789 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,51 @@ | ||
#!/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 | ||
# Allow TEST_TIMEOUT to be set from an environment variable | ||
TEST_TIMEOUT=${TEST_TIMEOUT:-300s} | ||
|
||
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 | ||
# Using timeout command to enforce time limits | ||
timeout $TEST_TIMEOUT ./$script > "${name}.log" 2>&1 | ||
status=$? | ||
cat "${name}.log" | ||
|
||
echo "::endgroup::" | ||
|
||
if [ $status -eq 0 ]; then | ||
echo "Passed: $name" | ||
elif [ $status -eq 124 ]; then | ||
echo "::error::Systest timed out: $name" | ||
overall_status=1 | ||
else | ||
echo "::error::Systest failed: $name ($status)" | ||
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 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
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
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
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
Oops, something went wrong.