summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2019-02-21 10:13:49 +0000
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2019-02-21 13:19:16 +0000
commitd3d178fc41f73540edc47bb08043be42a84377ea (patch)
treedc6ce91d9c1f175f6c57f8aff6075a22d0becbba
parent16e39e877d0e304c5f4f03a484a909312b443d00 (diff)
jenkins: Fix the test for journalctl if it isn't present
test -x for an empty string is still true. Check if the result of command is empty or not. It seems to work for the negative case now. Change-Id: I7e4326df155dae776481bf7824694b3fb47abcad
-rwxr-xr-xcontrib/jenkins-run.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/jenkins-run.sh b/contrib/jenkins-run.sh
index 0b41247..4a76c09 100755
--- a/contrib/jenkins-run.sh
+++ b/contrib/jenkins-run.sh
@@ -30,7 +30,7 @@ rm -rf "$trial_dir/inst" || true
# tar up all results for archiving (optional)
cd "$trial_dir"
-if [ -x $(command -v journalctl) ]; then
+if [ ! -z "$(command -v journalctl)" ]; then
journalctl -u ofono -o short-precise --since "${time_start}" > "$(readlink last_run)/ofono.log"
fi
tar czf "$base/${trial_dir}-run.tgz" "$(readlink last_run)"