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
This commit is contained in:
Holger Hans Peter Freyther 2019-02-21 10:13:49 +00:00
parent 16e39e877d
commit d3d178fc41
1 changed files with 1 additions and 1 deletions

View File

@ -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)"