From d3d178fc41f73540edc47bb08043be42a84377ea Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 21 Feb 2019 10:13:49 +0000 Subject: 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 --- contrib/jenkins-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)" -- cgit v1.2.3