From 3d0451ab8d6c12a2acc30900bac6440f1c0c4c87 Mon Sep 17 00:00:00 2001 From: Jeff Lane Date: Mon, 25 Nov 2019 17:02:06 -0500 Subject: Revisited solution and went with a resource rather than coding it into the command: section --- units/cpu/jobs.pxu | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'units/cpu') 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: -- cgit v1.2.3