Debian Codegraph @

engine/hack/make/test-integration-flaky

raw symbols SCIP
1 #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. bash
2 set -e -o pipefail
3
4 source hack/validate/.validatescip-shell source . . `hack/validate/.validate`.
5
6 run_integration_flakyscip-shell shell shell-project 0.0.0 run_integration_flaky().() {
7 new_tests=$(
8 validate_diff --diff-filter=ACMR --unified=0 -- 'integration/*_test.go' \
9 | grep -E '^(\+func Test)(.*)(\*testing\.T\))' || true
10 )
11
12 if [scip-shell system . . `[`. -z "$new_tests" ]; then
13 echoscip-shell system . . echo. 'No new tests added to integration.'
14 return
15 fi
16
17 echoscip-shell system . . echo.
18 echoscip-shell system . . echo. "Found new integrations tests:"
19 echoscip-shell system . . echo. "$new_tests"
20 echoscip-shell system . . echo. "Running stress test for them."
21
22 (
23 TESTARRAY=$(echoscip-shell system . . echo. "$new_tests" | sedscip-shell system . . sed. 's/+func //' | awkscip-shell system . . awk. -F'\\(' '{print $1}' | trscip-shell system . . tr. '\n' '|')
24 # Note: TEST_REPEAT will make the test suite run 5 times, restarting the daemon
25 # and each test will run 5 times in a row under the same daemon.
26 # This will make a total of 25 runs for each test in TESTARRAY.
27 export TEST_REPEAT=5
28 export TESTFLAGS="-test.count ${TEST_REPEAT} -test.run ${TESTARRAY%?}"
29 echoscip-shell system . . echo. "Using test flags: $TESTFLAGS"
30 source hack/make/test-integrationscip-shell source . . `hack/make/test-integration`.
31 )
32 }
33
34 run_integration_flakyscip-shell shell shell-project 0.0.0 run_integration_flaky().