From: Evgeny Vereshchagin Date: Mon, 7 Aug 2017 09:06:07 +0000 (+0300) Subject: tests: use ninja-build if ninja is not available (#6544) X-Git-Tag: v235~261 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ca992ecf073cc3eedc40169d0f2b23c990807d0f;p=thirdparty%2Fsystemd.git tests: use ninja-build if ninja is not available (#6544) This makes the tests work on CentOS, which currently has ninja-build only. --- diff --git a/test/test-functions b/test/test-functions index 5d66b7bc5b0..61787b6d339 100644 --- a/test/test-functions +++ b/test/test-functions @@ -317,7 +317,12 @@ install_dmevent() { install_systemd() { # install compiled files - (set -x; DESTDIR=$initdir ninja -C $BUILD_DIR install) + local _ninja_bin=$(type -P ninja || type -P ninja-build) + if [[ -z "$_ninja_bin" ]]; then + dfatal "ninja was not found" + exit 1 + fi + (set -x; DESTDIR=$initdir "$_ninja_bin" -C $BUILD_DIR install) # remove unneeded documentation rm -fr $initdir/usr/share/{man,doc} # we strip binaries since debug symbols increase binaries size a lot