Skip to content

Commit ae3986a

Browse files
chronos: check-test: log total test replay time (#13642)
sample: ``` $ ./infra/experimental/chronos/check_tests.sh jsonnet c++ ... -------------------------------------------------------- Total time taken to replay tests: 127 ``` Signed-off-by: David Korczynski <david@adalogics.com>
1 parent 6e485bb commit ae3986a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

infra/experimental/chronos/check_tests.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,14 @@ docker run \
5858
# Step 3: save (commit, locally) the cached container as an image
5959
docker container commit -c "ENV REPLAY_ENABLED=1" -c "ENV CAPTURE_REPLAY_SCRIPT=" ${_PROJECT}-origin-${_SANITIZER} $FINAL_IMAGE_NAME
6060

61+
T_START=$SECONDS
6162
# Step 4: run the actual run_tests.sh script in the container.
6263
docker run \
6364
--rm \
6465
-ti \
6566
us-central1-docker.pkg.dev/oss-fuzz/oss-fuzz-gen/${_PROJECT}-ofg-cached-address /bin/bash -c 'chmod +x /src/run_tests.sh && /src/run_tests.sh'
67+
T_END=$SECONDS
68+
69+
T_TOTAL_TIME=$(($T_END - $T_START))
70+
echo "--------------------------------------------------------"
71+
echo "Total time taken to replay tests: $T_TOTAL_TIME"

0 commit comments

Comments
 (0)