From 8fd1eacfb5c49738f9a26124cfa7a2423244637b Mon Sep 17 00:00:00 2001 From: Stanislav Levin Date: Feb 26 2020 11:07:55 +0000 Subject: Azure: Report elapsed time Reviewed-By: Alexander Bokovoy Reviewed-By: Alexander Bokovoy --- diff --git a/ipatests/azure/templates/run-test.yml b/ipatests/azure/templates/run-test.yml index a98d1dc..4fe30ae 100644 --- a/ipatests/azure/templates/run-test.yml +++ b/ipatests/azure/templates/run-test.yml @@ -24,22 +24,22 @@ steps: mkdir "$project_dir" # live-logging of tests within environment: '1' if [ "$project_id" == "1" ]; then - ./azure-run-tests.sh "$project_id" 2>&1 | \ + /usr/bin/time \ + --format="tests: ${project_name}, result: %x, time: %E" \ + --output="result_${project_id}" \ + -- \ + ./azure-run-tests.sh "$project_id" 2>&1 | \ ts '[%Y-%m-%d %H:%M:%S]' 2>&1 | tee "${project_dir}/${logfile}" result=$? else - ./azure-run-tests.sh "$project_id" 2>&1 | \ + /usr/bin/time \ + --format="tests: ${project_name}, result: %x, time: %E" \ + --output="result_${project_id}" \ + -- \ + ./azure-run-tests.sh "$project_id" 2>&1 | \ ts '[%Y-%m-%d %H:%M:%S]' 2>&1 > "${project_dir}/${logfile}" result=$? fi - - result_file="result_${project_id}" - if [ "$result" -eq 0 ]; then - result_msg="${project_name}: PASSED" - else - result_msg="${project_name}: FAILED" - fi - echo "$result_msg" > "$result_file" exit $result } export -f runner