Skip to content

Commit db77217

Browse files
committed
feat(devtool): compress test_results for CI uploads
Now `test_results` will contain a lot of files and directories with all test metrics and data files. To speed up upload and download of test_results, compress it's content if tests are run in CI. Also add an `--no-archive` option to skip archiving if needed. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
1 parent e83c764 commit db77217

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tools/devtool

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -681,6 +681,7 @@ unapply_performance_tweaks() {
681681
cmd_test() {
682682
do_ab_test=0
683683
do_build=1
684+
do_archive=1
684685
do_kvm_check=1
685686
# Parse any command line args.
686687
while [ $# -gt 0 ]; do
@@ -703,6 +704,9 @@ cmd_test() {
703704
"--no-build")
704705
do_build=0
705706
;;
707+
"--no-archive")
708+
do_archive=0
709+
;;
706710
"--no-kvm-check")
707711
do_kvm_check=0
708712
;;
@@ -802,6 +806,14 @@ cmd_test() {
802806
# do not leave behind env.list file
803807
rm env.list
804808

809+
# archive everything in the `test_result` to speed up upload/download
810+
# to s3 if we are in CI
811+
if [ $do_archive != 0 ] && [ -n "$BUILDKITE" ] && [ "$BUILDKITE" = "true" ]; then
812+
tar -czf data.tar -C test_results .
813+
rm -r test_results/*
814+
mv data.tar test_results
815+
fi
816+
805817
return $ret
806818
}
807819

0 commit comments

Comments
 (0)