summaryrefslogtreecommitdiffstats
path: root/scripts/contrib/dialog-power-control
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2025-11-07 13:31:53 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-11-07 13:31:53 +0000
commit8c22ff0d8b70d9b12f0487ef696a7e915b9e3173 (patch)
treeefdc32587159d0050a69009bdf2330a531727d95 /scripts/contrib/dialog-power-control
parentd412d2747595c1cc4a5e3ca975e3adc31b2f7891 (diff)
downloadpoky-8c22ff0d8b70d9b12f0487ef696a7e915b9e3173.tar.gz
The poky repository master branch is no longer being updated.
You can either: a) switch to individual clones of bitbake, openembedded-core, meta-yocto and yocto-docs b) use the new bitbake-setup You can find information about either approach in our documentation: https://docs.yoctoproject.org/ Note that "poky" the distro setting is still available in meta-yocto as before and we continue to use and maintain that. Long live Poky! Some further information on the background of this change can be found in: https://lists.openembedded.org/g/openembedded-architecture/message/2179 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/contrib/dialog-power-control')
-rwxr-xr-xscripts/contrib/dialog-power-control57
1 files changed, 0 insertions, 57 deletions
diff --git a/scripts/contrib/dialog-power-control b/scripts/contrib/dialog-power-control
deleted file mode 100755
index 82c84baa1d..0000000000
--- a/scripts/contrib/dialog-power-control
+++ /dev/null
@@ -1,57 +0,0 @@
1#!/bin/sh
2#
3# Copyright OpenEmbedded Contributors
4#
5# SPDX-License-Identifier: GPL-2.0-only
6#
7# Simple script to show a manual power prompt for when you want to use
8# automated hardware testing with testimage.bbclass but you don't have a
9# web-enabled power strip or similar to do the power on/off/cycle.
10#
11# You can enable it by enabling testimage (see the Yocto Project
12# Development manual "Performing Automated Runtime Testing" section)
13# and setting the following in your local.conf:
14#
15# TEST_POWERCONTROL_CMD = "${COREBASE}/scripts/contrib/dialog-power-control"
16#
17
18PROMPT=""
19while true; do
20 case $1 in
21 on)
22 PROMPT="Please turn device power on";;
23 off)
24 PROMPT="Please turn device power off";;
25 cycle)
26 PROMPT="Please click Done, then turn the device power off then on";;
27 "")
28 break;;
29 esac
30 shift
31done
32
33if [ "$PROMPT" = "" ] ; then
34 echo "ERROR: no power action specified on command line"
35 exit 2
36fi
37
38if [ "`which kdialog 2>/dev/null`" != "" ] ; then
39 DIALOGUTIL="kdialog"
40elif [ "`which zenity 2>/dev/null`" != "" ] ; then
41 DIALOGUTIL="zenity"
42else
43 echo "ERROR: couldn't find program to display a message, install kdialog or zenity"
44 exit 3
45fi
46
47if [ "$DIALOGUTIL" = "kdialog" ] ; then
48 kdialog --yesno "$PROMPT" --title "TestImage Power Control" --yes-label "Done" --no-label "Cancel test"
49elif [ "$DIALOGUTIL" = "zenity" ] ; then
50 zenity --question --text="$PROMPT" --title="TestImage Power Control" --ok-label="Done" --cancel-label="Cancel test"
51fi
52
53if [ "$?" != "0" ] ; then
54 echo "User cancelled test at power prompt"
55 exit 1
56fi
57