diff --git a/providers/base/units/stress/jobs.pxu b/providers/base/units/stress/jobs.pxu index 12871b9d15..c5472e9ab1 100644 --- a/providers/base/units/stress/jobs.pxu +++ b/providers/base/units/stress/jobs.pxu @@ -607,19 +607,26 @@ plugin:shell category_id: com.canonical.plainbox::stress id: stress/s2idle_pm-graph_30 estimated_duration: 10m -requires: +requires: + cpuinfo.type == 'GenuineIntel' executable.name == 'sleepgraph' sleep.mem_sleep == 's2idle' user: root _summary: Resume from idle by using Intel pm-graph command: - sleepgraph -m freeze -rtcwake 10 -sync -gzip -multi 30 0 -skiphtml -o "$PLAINBOX_SESSION_SHARE"/s2idle_pm-graph/s2idle-"$(date -d today +%Y-%m-%d-%H%M)" + if [ ! -f /proc/driver/nvidia/suspend ]; then + sleepgraph -m freeze -rtcwake 60 -sync -gzip -multi 30 30 -skiphtml -o "$PLAINBOX_SESSION_SHARE"/s2idle_pm-graph/s2idle-"$(date -d today +%Y-%m-%d-%H%M)" + else + echo "The platform has Nvidia driver loaded, which is not capable of running sleepgraph" + exit 1 + fi plugin: attachment category_id: com.canonical.plainbox::stress id: stress/s2idle_pm-graph_30.tar.xz estimated_duration: 1 -requires: +requires: + cpuinfo.type == 'GenuineIntel' sleep.mem_sleep == 's2idle' after: stress/s2idle_pm-graph_30 @@ -633,18 +640,25 @@ category_id: com.canonical.plainbox::stress id: stress/s3_pm-graph_30 estimated_duration: 10m requires: + cpuinfo.type == 'GenuineIntel' executable.name == 'sleepgraph' sleep.mem_sleep == 'deep' user: root _summary: Resume from suspend by using Intel pm-graph command: - sleepgraph -m mem -rtcwake 10 -sync -gzip -multi 30 0 -skiphtml -o "$PLAINBOX_SESSION_SHARE"/s3_pm-graph/suspend-"$(date -d today +%Y-%m-%d-%H%M)" + if [ ! -f /proc/driver/nvidia/suspend ]; then + sleepgraph -m mem -rtcwake 60 -sync -gzip -multi 30 30 -skiphtml -o "$PLAINBOX_SESSION_SHARE"/s3_pm-graph/suspend-"$(date -d today +%Y-%m-%d-%H%M)" + else + echo "The platform has Nvidia driver loaded, which is not capable of running sleepgraph" + exit 1 + fi plugin: attachment category_id: com.canonical.plainbox::stress id: stress/s3_pm-graph_30.tar.xz estimated_duration: 1 requires: + cpuinfo.type == 'GenuineIntel' sleep.mem_sleep == 'deep' after: stress/s3_pm-graph_30 diff --git a/providers/base/units/stress/test-plan.pxu b/providers/base/units/stress/test-plan.pxu index 9df81c6e4b..a71aa400c0 100644 --- a/providers/base/units/stress/test-plan.pxu +++ b/providers/base/units/stress/test-plan.pxu @@ -313,3 +313,5 @@ include: stress/s2idle_pm-graph_30.tar.xz stress/s3_pm-graph_30 stress/s3_pm-graph_30.tar.xz +bootstrap_include: + cpuinfo