diff options
author | Jeff Lane <jeffrey.lane@canonical.com> | 2017-08-21 18:06:46 -0400 |
---|---|---|
committer | Jeff Lane <jeffrey.lane@canonical.com> | 2017-08-21 18:06:46 -0400 |
commit | 25bc9f49d75cb70e3b2d88c4ebb3fbb4c63ce409 (patch) | |
tree | 16bc04b4b6267ef4621651cb3c9e525f94b29fdb | |
parent | 1cbb3c3c1c9e46d2d0468e951acc8edcd15ce9aa (diff) |
Fix dmesg_attachment job to work on systems that don't have a /var/log/dmesg file present, such as MAAS deployments. lp: #1712103
-rw-r--r-- | jobs/info.txt.in | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/jobs/info.txt.in b/jobs/info.txt.in index 0b270d87..900d4c74 100644 --- a/jobs/info.txt.in +++ b/jobs/info.txt.in @@ -31,10 +31,16 @@ _summary: Attach a copy of /proc/cpuinfo id: dmesg_attachment plugin: attachment category_id: com.canonical.plainbox::info -command: cat /var/log/dmesg | ansi_parser +user: root +command: + if [ -e /var/log/dmesg ]; then + cat /var/log/dmesg | ansi_parser + else + dmesg | ansi_parser + fi estimated_duration: 0.640 -_description: Attaches a copy of /var/log/dmesg to the test results -_summary: Attach a copy of /var/log/dmesg +_description: Attaches a copy of /var/log/dmesg or the current dmesg buffer to the test results +_summary: Attach a copy of dmesg id: dmi_attachment plugin: attachment |