File tree Expand file tree Collapse file tree 3 files changed +32
-0
lines changed
Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ import os
2+ import sys
3+ import tempfile
4+
5+ if __name__ == "__main__" :
6+ while True :
7+ fifo_path = sys .argv [1 ]
8+ with open (sys .argv [1 ], 'rb' ) as fifo :
9+ filename , ext = os .path .splitext (os .path .basename (fifo_path ))
10+ fd , _ = tempfile .mkstemp (
11+ suffix = ext , prefix = f"{ filename } ." , dir = os .path .dirname (fifo_path ))
12+ with os .fdopen (fd , 'wb' ) as out :
13+ out .write (fifo .read ())
14+
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ MONOREPO_ROOT="${MONOREPO_ROOT:="$(git rev-parse --show-toplevel)"}"
2020BUILD_DIR=" ${BUILD_DIR:= ${MONOREPO_ROOT} / build} "
2121INSTALL_DIR=" ${BUILD_DIR} /install"
2222rm -rf " ${BUILD_DIR} "
23+ mkdir -p ${BUILD_DIR}
2324
2425ccache --zero-stats
2526
@@ -28,7 +29,15 @@ if [[ -n "${CLEAR_CACHE:-}" ]]; then
2829 ccache --clear
2930fi
3031
32+ # This will capture each time lit results out results and put each in its own file.
33+ test_result_path=" ${BUILD_DIR} " /test-results.xml
34+ mkfifo $test_result_path
35+ python3 " ${MONOREPO_ROOT} " /.ci/fifo_read.py $test_result_path &
36+ fifo_pid=$!
37+
3138function at-exit {
39+ kill $fifo_pid
40+ rm $test_result_path
3241 python3 " ${MONOREPO_ROOT} " /.ci/generate_test_report.py " :linux: Linux x64 Test Results" \
3342 " linux-x64-test-results" " ${BUILD_DIR} " /test-results* .xml
3443
Original file line number Diff line number Diff line change @@ -20,14 +20,23 @@ MONOREPO_ROOT="${MONOREPO_ROOT:="$(git rev-parse --show-toplevel)"}"
2020BUILD_DIR=" ${BUILD_DIR:= ${MONOREPO_ROOT} / build} "
2121
2222rm -rf " ${BUILD_DIR} "
23+ mkdir -p ${BUILD_DIR}
2324
2425if [[ -n " ${CLEAR_CACHE:- } " ]]; then
2526 echo " clearing sccache"
2627 rm -rf " $SCCACHE_DIR "
2728fi
2829
30+ # This will capture each time lit results out results and put each in its own file.
31+ test_result_path=" ${BUILD_DIR} " /test-results.xml
32+ mkfifo $test_result_path
33+ python " ${MONOREPO_ROOT} " /.ci/fifo_read.py $test_result_path &
34+ fifo_pid=$!
35+
2936sccache --zero-stats
3037function at-exit {
38+ kill $fifo_pid
39+ rm $test_result_path
3140 python " ${MONOREPO_ROOT} " /.ci/generate_test_report.py " :windows: Windows x64 Test Results" \
3241 " windows-x64-test-results" " ${BUILD_DIR} " /test-results* .xml
3342
You can’t perform that action at this time.
0 commit comments