diff options
author | Evgeny Vereshchagin <evvers@ya.ru> | 2017-08-07 12:06:07 +0300 |
---|---|---|
committer | Martin Pitt <martinpitt@users.noreply.github.com> | 2017-08-07 11:06:07 +0200 |
commit | ca992ecf073cc3eedc40169d0f2b23c990807d0f (patch) | |
tree | a0bfd92994197175edd86aa84d9fff9c77169f42 | |
parent | 2d35b79cdc65952a71b768f4fc0e2134a47e0294 (diff) | |
download | systemd-ca992ecf073cc3eedc40169d0f2b23c990807d0f.tar.gz systemd-ca992ecf073cc3eedc40169d0f2b23c990807d0f.tar.bz2 systemd-ca992ecf073cc3eedc40169d0f2b23c990807d0f.zip |
tests: use ninja-build if ninja is not available (#6544)
This makes the tests work on CentOS, which currently has ninja-build
only.
-rw-r--r-- | test/test-functions | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/test-functions b/test/test-functions index 5d66b7bc5b..61787b6d33 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 |