diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-10-10 16:37:14 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2014-10-10 16:37:14 -0500 |
commit | f934717fd4eaa0e205182ad1414d79eb1fb700c1 (patch) | |
tree | 56b732fc659b0e885c4dd9b759e29824d108c90e /tests/manual | |
parent | 7eb00e86d2d9f25dbc62c5a4479e99ea5543d722 (diff) | |
download | ayatana-indicator-power-f934717fd4eaa0e205182ad1414d79eb1fb700c1.tar.gz ayatana-indicator-power-f934717fd4eaa0e205182ad1414d79eb1fb700c1.tar.bz2 ayatana-indicator-power-f934717fd4eaa0e205182ad1414d79eb1fb700c1.zip |
update manual test notes for the mock battery
Diffstat (limited to 'tests/manual')
-rw-r--r-- | tests/manual | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/tests/manual b/tests/manual index 1ec1524..a7351bc 100644 --- a/tests/manual +++ b/tests/manual @@ -1,21 +1,17 @@ Notes on Battery Testing -When building from source, an executable 'indicator-power-service-cmdline-battery' will be built in the tests/ directory. This has the same code as indicator-power-service, except instead of listening to UPower it has a single fake battery that can be set from the command line to set its charge level and whether it's charging or discharging. +Mock battery settings are available for testing purposes. -You'll need to stop the current indicator-power-service before starting the test one. After that, you enter in a number, or 'charging', or 'discharging', to set the fake battery. ctrl-c exits. +The indicator's schema name is "com.canonical.indicator.power" and there are four keys: "mock-battery-enabled" (a boolean), "mock-battery-level" (charger percent, an integer from 0-100), "mock-battery-charging" (a boolean of whether the mock battery is charging or discharging), and "mock-battery-minutes-left" (minutes remaining to charge/discharge). -Example: - -$ stop indicator-power # stop the real indicator-power service -$ build/tests/indicator-power-service-cmdline-battery # start the test service -50 # sets the fake battery level to 50% -30 # sets the fake battery level to 30% -charging # sets the fake battery to charging -discharging # sets the fake battery to discharging -ctrl-c # exits the test service -$ start indicator-power # restart the real service +Example use: +$ gsettings reset-recursively com.canonical.indicator.power # reset settings to the default state +$ gsettings list-recursively com.canonical.indicator.power | grep mock # show the current mock settings +$ gsettings set com.canonical.indicator.power mock-battery-enabled true # use the mock battery +$ gsettings set com.canonical.indicator.power mock-battery-level 10 # set the mock battery's charge to 10% +$ gsettings set com.canonical.indicator.power mock-battery-enabled false # go back to production settings Test-case indicator-power/unity7-items-check |