diff --git a/gitlab/build-crosstest b/gitlab/build-crosstest index 4e6c5b65f4a1734a4493dea1551f8bba1622b504..71ffede97d1fd3cefd4d5b7648376dae3bc2d0fb 100755 --- a/gitlab/build-crosstest +++ b/gitlab/build-crosstest @@ -1,10 +1,9 @@ #!/bin/bash -echo "Building $(git log -1)" -echo "---" - COMMIT=$(printf '%03d-%s' $(git cherry $CI_MERGE_REQUEST_DIFF_BASE_SHA HEAD^ | wc -l) $(git rev-parse --short HEAD)) +echo -e "\e[0Ksection_start:`date +%s`:commit_$COMMIT\r\e[0KBuilding commit $COMMIT" + set -Eeuxo pipefail # Building with -Wno-array-bounds because MinGW headers currently emit @@ -25,3 +24,5 @@ rsync -Rr config.log tests/*.txt tests/*.exe ../artifacts/$COMMIT || true cp tests/driver.cross64.exe ../artifacts git reset --hard + +echo -e "\e[0Ksection_end:`date +%s`:commit_$COMMIT\r\e[0K" diff --git a/gitlab/build-linux b/gitlab/build-linux index b149132c4651a0bab643e521852ec41e73704ec7..2a2a40c20b5753578dc9b3e909d866b9483ca482 100755 --- a/gitlab/build-linux +++ b/gitlab/build-linux @@ -1,10 +1,9 @@ #!/bin/bash -echo "Building $(git log -1)" -echo "---" - COMMIT=$(printf '%03d-%s' $(git cherry $CI_MERGE_REQUEST_DIFF_BASE_SHA HEAD^ | wc -l) $(git rev-parse --short HEAD)) +echo -e "\e[0Ksection_start:`date +%s`:commit_$COMMIT\r\e[0KBuilding commit $COMMIT" + set -Eeuxo pipefail ./autogen.sh @@ -26,3 +25,5 @@ mkdir -p ../artifacts/$COMMIT rsync -Rr config.log doc/* test-suite.log tests/*.log tests/*/*.log ../artifacts/$COMMIT || true git reset --hard + +echo -e "\e[0Ksection_end:`date +%s`:commit_$COMMIT\r\e[0K" diff --git a/gitlab/build-mac b/gitlab/build-mac index a311968625a2e3a2d6d5f7c144ede5d5c677343c..c0efbdf0cc275e7e53edcb60fdf2b254ac23503f 100755 --- a/gitlab/build-mac +++ b/gitlab/build-mac @@ -1,10 +1,9 @@ #!/bin/bash -echo "Building $(git log -1)" -echo "---" - COMMIT=$(printf '%03d-%s' $(git cherry $CI_MERGE_REQUEST_DIFF_BASE_SHA HEAD^ | wc -l) $(git rev-parse --short HEAD)) +echo -e "\033[0Ksection_start:`date +%s`:commit_$COMMIT\r\033[0KBuilding commit $COMMIT" + set -Eeuxo pipefail ./autogen.sh @@ -25,3 +24,5 @@ mkdir -p ../artifacts/$COMMIT rsync -Rr config.log test-suite.log tests/*.log tests/*/*.log ../artifacts/$COMMIT || true git reset --hard + +echo -e "\033[0Ksection_end:`date +%s`:commit_$COMMIT\r\033[0K" diff --git a/gitlab/build-mingw b/gitlab/build-mingw index 6d4cf189c9ee6f2f04cc073046434bdf8eeafb3e..3937d2244ecb8ddde4e2deeefbff5aacd915c95a 100755 --- a/gitlab/build-mingw +++ b/gitlab/build-mingw @@ -1,10 +1,9 @@ #!/bin/bash -echo "Building $(git log -1)" -echo "---" - COMMIT=$(printf '%03d-%s' $(git cherry $CI_MERGE_REQUEST_DIFF_BASE_SHA HEAD^ | wc -l) $(git rev-parse --short HEAD)) +echo -e "\e[0Ksection_start:`date +%s`:commit_$COMMIT\r\e[0KBuilding commit $COMMIT" + set -Eeuxo pipefail ./autogen.sh @@ -23,3 +22,5 @@ cp config.log ../artifacts/$COMMIT || true cp destdir/usr/local/bin/* ../artifacts/$COMMIT || true git reset --hard + +echo -e "\e[0Ksection_end:`date +%s`:commit_$COMMIT\r\e[0K" diff --git a/tests/driver.c b/tests/driver.c index 95f39adbb389bc6124b5ed704c9ba3adb785b4b6..4054f1c2f1882292d194caf691798498cc516366 100644 --- a/tests/driver.c +++ b/tests/driver.c @@ -19,6 +19,8 @@ #include <stdio.h> #include <stdbool.h> #include <stdlib.h> +#include <stdint.h> +#include <time.h> #include <windows.h> #include <shlobj.h> @@ -141,8 +143,8 @@ static bool run_tests_for_directory(const char *commit_dir) if (!test_arch) test_arch = "64"; - printf("Building %s\n", commit_dir); - printf("---\n"); + printf("\e[0Ksection_start:%I64d:commit_%s\r\e[0KBuilding commit %s\n", + (uint64_t)time(NULL), commit_dir, commit_dir); sprintf(list_filename, "artifacts/%s/tests/shader_tests.txt", commit_dir); list_file = fopen(list_filename, "r"); @@ -232,6 +234,9 @@ static bool run_tests_for_directory(const char *commit_dir) } } + printf("\e[0Ksection_end:%I64d:commit_%s\r\e[0K\n", + (uint64_t)time(NULL), commit_dir); + return ret; }