diff options
author | Sylvain Pineau <sylvain.pineau@canonical.com> | 2017-09-18 20:56:16 +0200 |
---|---|---|
committer | Sylvain Pineau <sylvain.pineau@canonical.com> | 2017-09-18 20:56:16 +0200 |
commit | 06ebc0457992bddfca74c3decc554d70ffdd310d (patch) | |
tree | ddc2038690c7e0bbd7146b3375681b919e91ab95 /units/info | |
parent | a2cbc59e55ed21f755f45a5db2df5695a2220315 (diff) |
Move all jobs definition files into pxu units
Diffstat (limited to 'units/info')
-rw-r--r-- | units/info/jobs.pxu | 417 | ||||
-rw-r--r-- | units/info/packaging.pxu | 14 |
2 files changed, 431 insertions, 0 deletions
diff --git a/units/info/jobs.pxu b/units/info/jobs.pxu new file mode 100644 index 0000000..0588e26 --- /dev/null +++ b/units/info/jobs.pxu @@ -0,0 +1,417 @@ +id: codecs_attachment +plugin: attachment +category_id: com.canonical.plainbox::info +command: cat /proc/asound/card*/codec#* +estimated_duration: 0.023 +_description: Attaches a report of installed codecs for Intel HDA + +id: cpuinfo_attachment +plugin: attachment +category_id: com.canonical.plainbox::info +command: cat /proc/cpuinfo +estimated_duration: 0.006 +_description: Attaches a report of CPU information +_summary: Attach a copy of /proc/cpuinfo + +id: dmesg_attachment +plugin: attachment +category_id: com.canonical.plainbox::info +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 or the current dmesg buffer to the test results +_summary: Attach a copy of dmesg + +id: dmi_attachment +plugin: attachment +category_id: com.canonical.plainbox::info +command: [ -d /sys/class/dmi/id/ ] && (grep -r . /sys/class/dmi/id/ 2>/dev/null || true) || false +estimated_duration: 0.044 +_description: Attaches info on DMI +_summary: Attach a copy of /sys/class/dmi/id/* +requires: + dmi_present.state == 'supported' + +id: dmidecode_attachment +plugin: attachment +category_id: com.canonical.plainbox::info +requires: + package.name == 'dmidecode' or executable.name == 'dmidecode' + dmi_present.state == 'supported' +user: root +command: dmidecode | iconv -t 'utf-8' -c +estimated_duration: 0.030 +_description: Attaches dmidecode output +_summary: Attach output of dmidecode + +id: lshw_attachment +plugin: attachment +category_id: com.canonical.plainbox::info +requires: package.name == 'lshw' or executable.name == 'lshw' +user: root +command: lshw | iconv -t 'utf-8' -c +_summary: Attach lshw output +_description: Attaches lshw output + +id: efi_attachment +plugin: attachment +category_id: com.canonical.plainbox::info +user: root +command: [ -d /sys/firmware/efi ] && grep -m 1 -o --color=never 'EFI v.*' /var/log/kern.log* || true +estimated_duration: 0.5 +_summary: Attaches firmware version info +_description: Attaches the firmware version + +id: lspci_attachment +plugin: attachment +category_id: com.canonical.plainbox::info +command: + if [[ -v SNAP ]]; then + lspci -i $SNAP/usr/share/misc/pci.ids -vvnn + else + lspci -vvnn | iconv -t 'utf-8' -c + fi +estimated_duration: 0.042 +_description: Attaches very verbose lspci output. +_summary: Attach a list of PCI devices + +id: lspci_network_attachment +plugin: attachment +category_id: com.canonical.plainbox::info +command: lspci -vvnnQ | iconv -t 'utf-8' -c +estimated_duration: 1.322 +_description: Attaches very verbose lspci output (with central database Query). + +id: lspci_standard_config_attachment +_summary: Attach PCI configuration space hex dump +plugin: attachment +category_id: com.canonical.plainbox::info +command: lspci -x +estimated_duration: 0.1 +_description: + Attaches a hex dump of the standard part of the PCI configuration + space for all PCI devices. + +id: lsusb_attachment +plugin: attachment +category_id: com.canonical.plainbox::info +user: root +command: + if [[ -v SNAP ]]; then + lsusb.py -f $SNAP/var/lib/usbutils/usb.ids + else + lsusb -vv | iconv -t 'utf-8' -c + fi +estimated_duration: 0.700 +flags: also-after-suspend +_summary: Attach output of lsusb +_description: Attaches a list of detected USB devices. + +id: meminfo_attachment +plugin: attachment +category_id: com.canonical.plainbox::info +command: cat /proc/meminfo +estimated_duration: 0.043 +_summary: Attach copy of /proc/meminfo +_description: Attaches info on system memory as seen in /proc/meminfo. + +id: modprobe_attachment +plugin: attachment +category_id: com.canonical.plainbox::info +command: find /etc/modprobe.* -name \*.conf | xargs cat +estimated_duration: 0.015 +_description: Attaches the contents of the various modprobe conf files. +_summary: Attach the contents of /etc/modprobe.* + +id: modinfo_attachment +plugin: attachment +category_id: com.canonical.plainbox::info +_summary: Attach modinfo information +command: + for mod in $(lsmod | cut -f 1 -d " ") + do + printf "%-16s%s\n" "name:" "$mod" + modinfo $mod + echo + done +estimated_duration: 1.5 +_description: Attaches modinfo information for all currently loaded modules + +id: modules_attachment +plugin: attachment +category_id: com.canonical.plainbox::info +command: cat /etc/modules +estimated_duration: 0.004 +_description: Attaches the contents of the /etc/modules file. +_summary: Attach the contents of /etc/modules + +id: sysctl_attachment +plugin: attachment +category_id: com.canonical.plainbox::info +command: find /etc/sysctl.* -name \*.conf | xargs cat +estimated_duration: 0.014 +_description: Attaches the contents of various sysctl config files. +_summary: Attach sysctl configuration files. + +id: sysfs_attachment +plugin: attachment +category_id: com.canonical.plainbox::info +_description: Attaches a report of sysfs attributes. +command: + for i in `udevadm info --export-db | sed -n 's/^P: //p'`; do + echo "P: $i" + udevadm info --attribute-walk --path=/sys$i 2>/dev/null | sed -n 's/ ATTR{\(.*\)}=="\(.*\)"/A: \1=\2/p' + echo + done +estimated_duration: 6.344 +_summary: Attach detailed sysfs property output from udev +requires: + model_assertion.model != "dragonboard" + +id: udev_attachment +plugin: attachment +category_id: com.canonical.plainbox::info +command: udevadm info --export-db | xml_sanitize +estimated_duration: 1.465 +_description: Attaches a dump of the udev database showing system hardware information. +_summary: Attach dump of udev database + +id: udev_resource_attachment +plugin: attachment +category_id: com.canonical.plainbox::info +command: udev_resource +estimated_duration: 0.432 +_description: Attaches the output of udev_resource, for debugging purposes + +id: lsblk_attachment +estimated_duration: 0.1 +plugin: attachment +command: lsblk -i -n -P -o KNAME,TYPE,MOUNTPOINT +requires: + package.name == "util-linux" or executable.name == 'lsblk' +_description: Attaches disk block devices mount points +_summary: Attach info block devices and their mount points + +id: gcov_attachment +plugin: attachment +category_id: com.canonical.plainbox::info +requires: package.name == 'lcov' +user: root +command: gcov_tarball +_description: Attaches a tarball of gcov data if present. + +id: lsmod_attachment +plugin: attachment +category_id: com.canonical.plainbox::info +command: lsmod_info +estimated_duration: 0.5 +_description: Attaches a list of the currently running kernel modules. +_summary: Attach a list of currently running kernel modules + +id: dkms_info_attachment +plugin: attachment +category_id: com.canonical.plainbox::info +requires: + package.name == 'dkms' +command: dkms_info --format json +_description: Attaches json dumps of installed dkms package information. +_summary: Attaches json dumps of installed dkms package information. + +plugin: attachment +category_id: com.canonical.plainbox::info +id: acpi_sleep_attachment +command: [ -e /proc/acpi/sleep ] && cat /proc/acpi/sleep || echo "No /proc/acpi/sleep found" +estimated_duration: 0.5 +_description: Attaches the contents of /proc/acpi/sleep if it exists. + +plugin: shell +category_id: com.canonical.plainbox::info +id: info/bootchart +_description: Bootchart information. +requires: package.name == 'bootchart' or package.name == 'pybootchartgui' +user: root +command: + process_wait -u root bootchart collector ureadahead; \ + [ `ls /var/log/bootchart/*.tgz 2>/dev/null | wc -l` -lt 2 ] && reboot && sleep 100 + +unit: template +template-resource: device +template-filter: device.category == 'DISK' +plugin: attachment +category_id: com.canonical.plainbox::info +id: info/hdparm_{name}.txt +estimated_duration: 1.0 +requires: + package.name == 'hdparm' or executable.name == 'hdparm' + block_device.state != 'removable' and block_device.name == '{name}' +user: root +command: hdparm -I /dev/{name} +_summary: Attaches info from hdparm about {name} + +plugin: attachment +category_id: com.canonical.plainbox::info +id: bootchart.png +depends: info/bootchart +requires: package.name == 'pybootchartgui' +_description: Attaches the bootchart png file for bootchart runs +command: + file=`ls /var/log/bootchart/*.png 2>/dev/null | tail -1`; \ + [ -e "$file" ] && cat "$file" + +plugin: attachment +category_id: com.canonical.plainbox::info +id: bootchart.tgz +depends: info/bootchart +_description: Attaches the bootchart log for bootchart test runs. +command: + file=`ls /var/log/bootchart/*.tgz 2>/dev/null | tail -1`; \ + [ -e "$file" ] && cat "$file" + +plugin: attachment +category_id: com.canonical.plainbox::info +id: installer_bootchart.tgz +command: [ -f /var/log/installer/bootchart.tgz ] && base64 /var/log/installer/bootchart.tgz +_description: Attach the installer bootchart tarball if it exists. + +plugin: attachment +category_id: com.canonical.plainbox::info +id: installer_debug.gz +user: root +command: [ -f /var/log/installer/debug ] && gzip -9 -c /var/log/installer/debug | base64 +estimated_duration: 0.1 +_description: Attaches the installer debug log if it exists. + +plugin: attachment +category_id: com.canonical.plainbox::info +id: info/touchpad_driver +requires: device.category == 'TOUCHPAD' +command: touchpad_driver_info +estimated_duration: 0.384 +_description: + Returns the name, driver name and driver version of any touchpad discovered on + the system. + +plugin: attachment +category_id: com.canonical.plainbox::info +id: info/audio_device_driver +requires: + package.name == 'pulseaudio-utils' + package.name == 'kmod' or package.name == 'module-init-tools' + device.category == 'AUDIO' +command: audio_driver_info +estimated_duration: 0.177 +_description: Lists the device driver and version for all audio devices. + +plugin: attachment +category_id: com.canonical.plainbox::info +id: info/network_devices +command: network_device_info +estimated_duration: 0.550 +_description: Provides information about network devices + +plugin: attachment +category_id: com.canonical.plainbox::info +id: info/mobile_broadband_info +command: broadband_info +estimated_duration: 0.5 +_description: Provides information about wwan/mobile broadband devices + +plugin: attachment +category_id: com.canonical.plainbox::info +id: info/xrandr +command: xrandr -q --verbose +_description: Provides information about displays attached to the system + +plugin: attachment +category_id: com.canonical.plainbox::info +id: info/disk_partitions +estimated_duration: 1.0 +user: root +command: parted -l -s +_summary: Attaches info about disk partitions +_description: Attaches information about disk partitions + +plugin: attachment +category_id: com.canonical.plainbox::info +id: info/buildstamp +estimated_duration: 0.1 +_description: Attaches the buildstamp identifier for the preinstalled OS +_summary: Attach /etc/buildstamp +command: [ -s /etc/buildstamp ] && cat /etc/buildstamp + +plugin: shell +category_id: com.canonical.plainbox::info +id: info/detect_recovery +requires: package.name == 'dell-recovery' or package.name == 'ubuntu-recovery' +user: root +estimated_duration: 0.2 +_summary: Check existence of recovery partition +_description: Check existence of recovery partition +command: recovery_info + +plugin: shell +category_id: com.canonical.plainbox::info +id: info/detect_dell_recovery +depends: info/detect_recovery +requires: package.name == 'dell-recovery' +user: root +estimated_duration: 0.2 +_summary: Check the recovery type is dell or not +_description: Check the recovery type is dell or not +command: recovery_info checktype DELL + +plugin: attachment +category_id: com.canonical.plainbox::info +id: recovery_info_attachment +depends: info/detect_recovery +requires: package.name == 'dell-recovery' or package.name == 'ubuntu-recovery' +user: root +estimated_duration: 0.2 +_summary: Attach the recovery partition versions +_description: + Attach the recovery partition version + image_version is the preinstalled OS image version + bto_version is only for dell_recovery + Example: + image_version: somerville-trusty-amd64-20140620-0 + bto_version: A00_dell-bto-trusty-houston-15-A11-iso-20141203-0.iso +command: recovery_info version + +plugin: attachment +category_id: com.canonical.plainbox::info +id: dell_bto_xml_attachment +depends: info/detect_dell_recovery +requires: package.name == 'dell-recovery' +user: root +estimated_duration: 0.5 +_summary: Attach the bto.xml in Dell recovery partition +_description: + bto.xml is basically a Fish manifest + The information include: + - fish packages + - dell recovery stage 2 boot log +command: recovery_info file bto.xml + +plugin: attachment +category_id: com.canonical.plainbox::info +id: info/kvm_output +estimated_duration: 0.1 +_summary: + Attaches console log from the kvm_check_vm test +_description: + Attaches the debug log from the virtualization/kvm_check_vm test + to the results submission. +command: [ -f $PLAINBOX_SESSION_SHARE/virt_debug ] && cat $PLAINBOX_SESSION_SHARE/virt_debug + +id: kernel_cmdline_attachment +plugin: attachment +category_id: com.canonical.plainbox::info +command: cat /proc/cmdline +estimated_duration: 0.005 +_description: Attaches the kernel command line used to boot +_summary: Attach a copy of /proc/cmdline diff --git a/units/info/packaging.pxu b/units/info/packaging.pxu new file mode 100644 index 0000000..26d76cb --- /dev/null +++ b/units/info/packaging.pxu @@ -0,0 +1,14 @@ +# The dkms_info script requires python3-debian package +unit: packaging meta-data +os-id: debian +Depends: python3-debian + +# The dkms_info script requires python3-guacamole package +unit: packaging meta-data +os-id: debian +Depends: python3-guacamole (>= 0.9) + +# This is for lsblk attachment and disk/detect +unit: packaging meta-data +os-id: debian +Depends: util-linux |