Add systests to CI and fix for rocksdb mode (issue #3447) (issue #3452) (#3468)

Fix systests when running in rocksdb mode (different ledger files)
Fix for CI build of nano_node that default to dev network
Add systests into github per commit CI.
This commit is contained in:
dsiganos 2021-09-28 16:52:58 +01:00 committed by GitHub
commit 736af8f386
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 17 deletions

View file

@ -70,10 +70,14 @@ run_tests() {
xvfb_run_ ./qt_test
qt_test_res=${?}
(cd ../systest && export NANO_NODE_EXE=../build/nano_node && ${TIMEOUT_CMD} ${TIMEOUT_TIME_ARG} 300 ./RUNALL)
sys_test_res=${?}
echo "Core Test return code: ${core_test_res}"
echo "RPC Test return code: ${rpc_test_res}"
echo "QT Test return code: ${qt_test_res}"
if [[ ${core_test_res} != 0 || ${rpc_test_res} != 0 || ${qt_test_res} != 0 ]]; then
echo "Sys Test return code: ${sys_test_res}"
if [[ ${core_test_res} != 0 || ${rpc_test_res} != 0 || ${qt_test_res} != 0 || ${sys_test_res} != 0 ]]; then
return 1
else
return 0

View file

@ -2,8 +2,11 @@
set -e
failed=0
for script in *.sh; do
echo Running script: $script
./$script;
done
echo All systest passed.
echo All systests passed.

View file

@ -11,10 +11,11 @@ SEED=CEEDCEEDCEEDCEEDCEEDCEEDCEEDCEEDCEEDCEEDCEEDCEEDCEEDCEEDCEEDCEED
NANO_NODE_EXE=${NANO_NODE_EXE:-../../build/nano_node}
clean_data_dir() {
rm -f $DATADIR/log/log_*.log
rm -f $DATADIR/wallets.ldb*
rm -f $DATADIR/data.ldb*
rm -f $DATADIR/config-*.toml
rm -f $DATADIR/log/log_*.log
rm -f $DATADIR/wallets.ldb*
rm -f $DATADIR/data.ldb*
rm -f $DATADIR/config-*.toml
rm -rf "$DATADIR"/rocksdb/
}
mkdir -p $DATADIR/log

View file

@ -9,10 +9,11 @@ DATADIR=data.systest
NANO_NODE_EXE=${NANO_NODE_EXE:-../../build/nano_node}
clean_data_dir() {
rm -f "$DATADIR"/log/log_*.log
rm -f "$DATADIR"/wallets.ldb*
rm -f "$DATADIR"/data.ldb*
rm -f "$DATADIR"/config-*.toml
rm -f "$DATADIR"/log/log_*.log
rm -f "$DATADIR"/wallets.ldb*
rm -f "$DATADIR"/data.ldb*
rm -f "$DATADIR"/config-*.toml
rm -rf "$DATADIR"/rocksdb/
}
test_initialize_cmd() {
@ -29,8 +30,7 @@ test_initialize_cmd() {
# check that it is the live network
grep -q "Active network: $netmatch" "$DATADIR"/log/log_*.log
# check that the ledger file is created
test -e "$DATADIR/data.ldb"
# check that the ledger file is created and has one block, the genesis block
$NANO_NODE_EXE --debug_block_count --data_path "$DATADIR" "$netcmd" "$netarg" | grep -q 'Block count: 1'
# check the genesis block is correct
@ -39,7 +39,7 @@ test_initialize_cmd() {
mkdir -p "$DATADIR/log"
test_initialize_cmd "live" "" "" "991CF190094C00F0B68E2E5F75F6BEE95A2E0BD93CEAA4A6734DB9F19B728948"
#test_initialize_cmd "live" "" "" "991CF190094C00F0B68E2E5F75F6BEE95A2E0BD93CEAA4A6734DB9F19B728948"
test_initialize_cmd "live" "--network" "live" "991CF190094C00F0B68E2E5F75F6BEE95A2E0BD93CEAA4A6734DB9F19B728948"
test_initialize_cmd "beta" "--network" "beta" "01A92459E69440D5C1088D3B31F4CA678BE944BAB3776C2E6B7665E9BD99BD5A"
test_initialize_cmd "test" "--network" "test" "B1D60C0B886B57401EF5A1DAA04340E53726AA6F4D706C085706F31BBD100CEE"

View file

@ -5,10 +5,11 @@ set -e
DATADIR=data.systest
clean_data_dir() {
rm -f "$DATADIR"/log/log_*.log
rm -f "$DATADIR"/wallets.ldb*
rm -f "$DATADIR"/data.ldb*
rm -f "$DATADIR"/config-*.toml
rm -f "$DATADIR"/log/log_*.log
rm -f "$DATADIR"/wallets.ldb*
rm -f "$DATADIR"/data.ldb*
rm -f "$DATADIR"/config-*.toml
rm -rf "$DATADIR"/rocksdb/
}
msg() {