diff options
author | Jeff Lane <jeffrey.lane@canonical.com> | 2017-08-21 18:06:46 -0400 |
---|---|---|
committer | Maciej Kisielewski <maciej.kisielewski@canonical.com> | 2017-08-27 13:32:14 +0200 |
commit | f39c691b70e3c0f8f058751b77724e4a36780491 (patch) | |
tree | f1cd0615615b1529227f8f30d9e3e540a0c914e3 | |
parent | db7f8360884254cf62cfc2c54c102038850dae0d (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 0b270d8..900d4c7 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 |