2022-03-02 06:15:24 -08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -x
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
-- | cargo)
|
2022-03-05 09:32:46 -08:00
|
|
|
if [[ "$RUN_ALL_TESTS" -eq "1" ]]; then
|
2022-05-10 19:26:39 -07:00
|
|
|
exec cargo "test" "--locked" "--release" "--workspace" "--" "--include-ignored"
|
2022-03-05 09:32:46 -08:00
|
|
|
elif [[ "$TEST_FULL_SYNC" -eq "1" ]]; then
|
2022-05-10 19:26:39 -07:00
|
|
|
exec cargo "test" "--locked" "--release" "--test" "acceptance" "--" "--nocapture" "--ignored" "full_sync_mainnet"
|
2022-05-04 15:55:02 -07:00
|
|
|
elif [[ "$TEST_DISK_REBUILD" -eq "1" ]]; then
|
2022-05-10 19:26:39 -07:00
|
|
|
exec cargo "test" "--locked" "--release" "--features" "test_sync_to_mandatory_checkpoint_${NETWORK,,}" "--manifest-path" "zebrad/Cargo.toml" "sync_to_mandatory_checkpoint_${NETWORK,,}"
|
2022-05-04 15:55:02 -07:00
|
|
|
elif [[ "$TEST_CHECKPOINT_SYNC" -eq "1" ]]; then
|
2022-05-10 19:26:39 -07:00
|
|
|
exec cargo "test" "--locked" "--release" "--features" "test_sync_past_mandatory_checkpoint_${NETWORK,,}" "--manifest-path" "zebrad/Cargo.toml" "sync_past_mandatory_checkpoint_${NETWORK,,}"
|
2022-05-05 02:27:07 -07:00
|
|
|
elif [[ "$TEST_LWD_RPC_CALL" -eq "1" ]]; then
|
2022-05-10 19:26:39 -07:00
|
|
|
exec cargo "test" "--locked" "--release" "--test" "acceptance" "--" "--nocapture" "--ignored" "fully_synced_rpc_test"
|
2022-05-05 22:30:38 -07:00
|
|
|
elif [[ "$TEST_LWD_TRANSACTIONS" -eq "1" ]]; then
|
2022-05-10 19:26:39 -07:00
|
|
|
exec cargo "test" "--locked" "--release" "--test" "acceptance" "--" "--nocapture" "--ignored" "sending_transactions_using_lightwalletd"
|
2022-03-05 09:32:46 -08:00
|
|
|
else
|
|
|
|
exec "$@"
|
2022-03-02 06:15:24 -08:00
|
|
|
fi
|
|
|
|
;;
|
|
|
|
zebrad)
|
|
|
|
exec zebrad "$@"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
exec "$@"
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit 1
|