[PATCH] selftests/intel_pstate: "cpupower" command is the pre-requirement of intel_pstate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Naresh Kamboju <naresh.kamboju@xxxxxxxxxx>

The "cpupower" command is the pre-requirement of intel_pstate test case.
If command not found test exit gracefully.

Signed-off-by: Naresh Kamboju <naresh.kamboju@xxxxxxxxxx>
---
 tools/testing/selftests/intel_pstate/run.sh | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tools/testing/selftests/intel_pstate/run.sh b/tools/testing/selftests/intel_pstate/run.sh
index 7868c106b8b1..9b88230fb1ab 100755
--- a/tools/testing/selftests/intel_pstate/run.sh
+++ b/tools/testing/selftests/intel_pstate/run.sh
@@ -66,6 +66,14 @@ function run_test () {
 	done
 }
 
+# Pre-requirement check
+which cpupower
+if [ $? -eq 1 ]; then
+	echo "Please install cpupower to run intel_pstate"
+	echo "intel_pstate: [SKIP]"
+	exit 0
+fi
+
 #
 # MAIN (ALL UNITS IN MHZ)
 #
-- 
2.13.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux