Skip to content

Commit

Permalink
make check fails if the number of tests is wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
jonjove committed Mar 27, 2020
1 parent 0a39dab commit 18cfaae
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/test/selftest-parallel
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@ perl -e '
close $out;
}' -- "$NUM_PARTITIONS" "$TEST_SPEC" "$TEST_PARTITIONS_DIR" "$RND_SEED"

NUM_TESTS=0
for p in $(seq 0 $((NUM_PARTITIONS-1))); do
NUM_TESTS=$((NUM_TESTS + $(awk 'END{print NR}' $TEST_PARTITIONS_DIR/test-partition-$p.txt)))
done
ACTUAL_NUM_TESTS=$(./stellar-core test --ll FATAL --list-test-names-only "$TEST_SPEC" | awk 'END{print NR}')
if [[ $NUM_TESTS -ne $ACTUAL_NUM_TESTS ]]; then
echo "Partitions contain $NUM_TESTS tests, while stellar-core lists $ACTUAL_NUM_TESTS tests"
exit 1
fi

runpart()
{
local PART=$1
Expand Down

0 comments on commit 18cfaae

Please sign in to comment.