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 10:13:49 +0000
commit16e39e877d0e304c5f4f03a484a909312b443d00 (patch)
treea391fb579917368c09c9414cce1bfffaf5a3cb63
parentae0dae821cc9c8c06bd43e6c1e47509cb6b8ae35 (diff)
jenkins: Only run journalctl if it is available on the machine
It's not common to run journald inside containers and the journalctl command is not installed. Don't attempt to run it. Change-Id: I9dee3cb0d0ca203da77dfa1a793a4e4e5f8593c6
-rwxr-xr-xcontrib/jenkins-run.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/jenkins-run.sh b/contrib/jenkins-run.sh
index 716899e..0b41247 100755
--- a/contrib/jenkins-run.sh
+++ b/contrib/jenkins-run.sh
@@ -30,7 +30,9 @@ rm -rf "$trial_dir/inst" || true
# tar up all results for archiving (optional)
cd "$trial_dir"
-journalctl -u ofono -o short-precise --since "${time_start}" > "$(readlink last_run)/ofono.log"
+if [ -x $(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)"
tar czf "$base/${trial_dir}-bin.tgz" *.md5 *.tgz