Skip to content

Commit

Permalink
Update run-tests.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
parfeon authored Dec 10, 2024
1 parent a1be870 commit 35a78e1
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions scripts/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ clean_coverage_output () {
}


echo "Install 'gocovmerge' module"
# Install 'gocovmerge' module.
go install github.com/wadey/gocovmerge@latest > /dev/null 2>&1

Expand All @@ -117,47 +118,47 @@ echo "Run functional tests"
if ! TESTS_RUN_OUTPUT="$(go test $WITH_MOD -v -coverprofile=functional_tests.out -covermode=atomic -coverpkg=./ ./ 2>&1)"; then
parse_test_utput "$TESTS_RUN_OUTPUT"
clean_coverage_output
exit 1
exit 2
fi
[[ -n $TESTS_RUN_OUTPUT ]] && parse_test_utput "$TESTS_RUN_OUTPUT"

echo "Run utils tests"
if ! TESTS_RUN_OUTPUT="$(go test $WITH_MOD -v -race -coverprofile=utils_tests.out -covermode=atomic -coverpkg=./ ./utils/ 2>&1)"; then
parse_test_utput "$TESTS_RUN_OUTPUT"
clean_coverage_output
exit 1
exit 3
fi
[[ -n $TESTS_RUN_OUTPUT ]] && parse_test_utput "$TESTS_RUN_OUTPUT"

echo "Run helpers tests"
if ! TESTS_RUN_OUTPUT="$(go test $WITH_MOD -v -race -coverprofile=helpers_tests.out -covermode=atomic -coverpkg=./ ./tests/helpers/ 2>&1)"; then
parse_test_utput "$TESTS_RUN_OUTPUT"
clean_coverage_output
exit 1
exit 4
fi
[[ -n $TESTS_RUN_OUTPUT ]] && parse_test_utput "$TESTS_RUN_OUTPUT"

echo "Run integration tests"
if ! TESTS_RUN_OUTPUT="$(go test $WITH_MOD -v -race -coverprofile=integration_tests.out -covermode=atomic -coverpkg=./ ./tests/e2e/ 2>&1)"; then
parse_test_utput "$TESTS_RUN_OUTPUT"
clean_coverage_output
exit 1
exit 5
fi
[[ -n $TESTS_RUN_OUTPUT ]] && parse_test_utput "$TESTS_RUN_OUTPUT"

echo "Run deadlock tests #1"
if ! TESTS_RUN_OUTPUT="$(go test $WITH_MOD -v -race -run "TestDestroy\b" -count 20 -coverprofile=deadlock_tests.out 2>&1)"; then
parse_test_utput "$TESTS_RUN_OUTPUT"
clean_coverage_output
exit 1
exit 6
fi
[[ -n $TESTS_RUN_OUTPUT ]] && parse_test_utput "$TESTS_RUN_OUTPUT"

echo "Run deadlock tests #2"
if ! TESTS_RUN_OUTPUT="$(go test $WITH_MOD -v -race -run "TestDestroy2\b" -count 20 -coverprofile=deadlock2_tests.out -covermode=atomic -coverpkg=./ ./tests/e2e/ 2>&1)"; then
parse_test_utput "$TESTS_RUN_OUTPUT"
clean_coverage_output
exit 1
exit 7
fi
[[ -n $TESTS_RUN_OUTPUT ]] && parse_test_utput "$TESTS_RUN_OUTPUT"

Expand Down

0 comments on commit 35a78e1

Please sign in to comment.