ipfs-cluster/sharness/run-sharness-tests.sh
Hector Sanjuan 063c5f1b78 Service: Select consensus on "init" (not on "daemon")
Fixes #865.

This makes the necessary changes so that consensu is selected on "init" with a
flag set, by default, to "crdt". This generates only a "crdt" or a "raft"
section, not both.

If the configuration file has a "raft" section, "raft" will be used to start
the daemon. If it has a "crdt" section, "crdt" will be used. If it has none or
both sections, an error will happen.

This also affects "state *" commands, which will now autoselect how to work
from the existing configuration.
2019-08-09 19:20:53 +02:00

32 lines
520 B
Bash
Executable File

#!/bin/bash
# Run tests
cd "$(dirname "$0")"
statuses=0
for i in t0*.sh;
do
echo "*** $i ***"
./$i
status=$?
statuses=$((statuses + $status))
if [ $status -ne 0 ]; then
echo "Test $i failed"
fi
done
# Aggregate Results
echo "Aggregating..."
for f in test-results/*.counts; do
echo "$f";
done | bash lib/sharness/aggregate-results.sh
# Cleanup results
rm -rf test-results
# Exit with error if any test has failed
if [ $statuses -gt 0 ]; then
echo $statuses
exit 1
fi
exit 0