Skip to content

Commit

Permalink
add exit trap
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-sanche authored Oct 12, 2023
1 parent d2e4366 commit 7f78895
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .kokoro/conformance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,18 @@ nohup python test_proxy.py --port $PROXY_PORT $PROXY_ARGS &
proxyPID=$!
popd

# Kill proxy on exit
function cleanup() {
echo "Cleanup testbench";
kill $proxyPID
}
trap cleanup EXIT

# Run the conformance test
pushd cloud-bigtable-clients-test/tests
eval "go test -v -proxy_addr=:$PROXY_PORT $TEST_ARGS"
RETURN_CODE=$?
popd

# Stop the proxy
kill $proxyPID

echo "exiting with ${RETURN_CODE}"
exit ${RETURN_CODE}

0 comments on commit 7f78895

Please sign in to comment.