summaryrefslogtreecommitdiff
diff options
authorPMR <pmr@pmr-lander>2019-08-26 13:37:05 +0000
committerPMR <pmr@pmr-lander>2019-08-26 13:37:05 +0000
commitf86587bb535f6f63d247f6e6d41edf1d7c308108 (patch)
treee8ab54ae8aa7477901ec28aa5067ae7832b52d5c
parent4e79129c7ab2e6663d986ba708f4afac538edb06 (diff)
parent82092fb10b2142b3e03307c1cb411d68cb1af311 (diff)
Merge #371787 from ~taihsiangho/plainbox-provider-checkbox:mr-support-stress-ng-env-var
-rw-r--r--units/disk/jobs.pxu10
-rw-r--r--units/stress/jobs.pxu10
2 files changed, 18 insertions, 2 deletions
diff --git a/units/disk/jobs.pxu b/units/disk/jobs.pxu
index b2e4301..3e0f568 100644
--- a/units/disk/jobs.pxu
+++ b/units/disk/jobs.pxu
@@ -90,7 +90,15 @@ requires:
package.name == 'uuid-runtime' or executable.name == 'uuidgen'
_summary: Disk stress_ng test for {product_slug}
_description: Disk stress_ng test for {product_slug}
-command: disk_stress_ng {name} --base-time 240 --really-run
+command:
+ if [ -n "$STRESS_NG_DISK_TIME" ]
+ then
+ echo "Found STRESS_NG_DISK_TIME env var, stress_ng disk running time is now: $STRESS_NG_DISK_TIME seconds"
+ disk_stress_ng {name} --base-time $STRESS_NG_DISK_TIME --really-run
+ else
+ echo "STRESS_NG_DISK_TIME env var is not found, stress_ng disk running time is default value"
+ disk_stress_ng {name} --base-time 240 --really-run
+ fi
unit: template
template-resource: device
diff --git a/units/stress/jobs.pxu b/units/stress/jobs.pxu
index 756d537..0c710ac 100644
--- a/units/stress/jobs.pxu
+++ b/units/stress/jobs.pxu
@@ -18,7 +18,15 @@ estimated_duration: 7200.0
requires:
package.name == 'stress-ng' or executable.name == 'stress-ng'
user: root
-command: cpu_stress --runtime 7200
+command:
+ if [ -n "$STRESS_NG_CPU_TIME" ]
+ then
+ echo "Found STRESS_NG_CPU_TIME env var, stress_ng cpu running time is now: $STRESS_NG_CPU_TIME seconds"
+ cpu_stress --runtime $STRESS_NG_CPU_TIME
+ else
+ echo STRESS_NG_CPU_TIME env var is not found, stress_ng cpu running time is default value
+ cpu_stress --runtime 7200
+ fi
_summary:
Stress of CPUs (very long runtime)
_description: