Module: check_mk
Branch: master
Commit: d35050f7ec1024be2953ee027d1a14d0dd836263
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d35050f7ec1024…
Author: Jukka Aro <ja(a)mathias-kettner.de>
Date: Tue Feb 6 16:15:49 2018 +0100
Re-enable parallel build for Googletest
This should reduce chroot setup time at least a bit. The output of
single build steps will be separated from each other, so the build
output should remain readable even if run in parallel - in the rare
case someone would still like to read it.
---
agents/windows/test/build-googletest | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/agents/windows/test/build-googletest b/agents/windows/test/build-googletest
index caa90d7..fba94c3 100755
--- a/agents/windows/test/build-googletest
+++ b/agents/windows/test/build-googletest
@@ -23,9 +23,17 @@ for project in test mock ; do
# we only need the libs...
targets=lib/libg${project}.la
autoreconf --install
+ # Build 32 and 64 bit in parallel, wait for child processes to terminate.
+ children=()
for arch in 32 64 ; do
- build $arch
+ build $arch &
+ children+=($!)
done
+ for pid in "${children[@]}" ; do
+ # If any subprocess fails, wait for the rest to exit in a controlled way.
+ wait $pid || { wait; exit 1; }
+ done
+
# make install is not supported by Google -> copy headers and libs
cp -r include/g${project} /usr/share/mingw-w64/include/
for arch in 32 64 ; do