summaryrefslogtreecommitdiff
path: root/units/cpu
diff options
authorJeff Lane <jeffrey.lane@canonical.com>2019-11-25 17:02:06 -0500
committerJeff Lane <jeffrey.lane@canonical.com>2019-11-25 17:02:06 -0500
commit3d0451ab8d6c12a2acc30900bac6440f1c0c4c87 (patch)
tree1b2dc1d39ee836460853f00970ab50100417ad1d /units/cpu
parent95b39aeccda90a8211e6563e4308500428b727af (diff)
Revisited solution and went with a resource rather than coding it into the command: section
Diffstat (limited to 'units/cpu')
-rw-r--r--units/cpu/jobs.pxu10
1 files changed, 4 insertions, 6 deletions
diff --git a/units/cpu/jobs.pxu b/units/cpu/jobs.pxu
index a3ebb24..6ccc3fe 100644
--- a/units/cpu/jobs.pxu
+++ b/units/cpu/jobs.pxu
@@ -2,18 +2,16 @@ plugin: shell
category_id: com.canonical.plainbox::cpu
id: cpu/scaling_test
estimated_duration: 150.0
-requires: executable.name == 'fwts'
+requires:
+ executable.name == 'fwts'
+ 'performance' in cpuinfo.governors
user: root
environ: PLAINBOX_SESSION_SHARE LD_LIBRARY_PATH SNAP
command:
if [[ -v SNAP ]]; then
export LD_LIBRARY_PATH=$SNAP/usr/lib/fwts:$LD_LIBRARY_PATH
fi
- if grep -q userspace /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors; then
- checkbox-support-fwts_test -t cpufreq -l ${PLAINBOX_SESSION_SHARE}/scaling_test.log
- else
- echo "userspace CPU governor not supported"
- fi
+ checkbox-support-fwts_test -t cpufreq -l ${PLAINBOX_SESSION_SHARE}/scaling_test.log
_summary:
Test the CPU scaling capabilities
_description: