[skip ci] shutdown script
This commit is contained in:
1 parent
6fd99afd8a
commit
6b62532b48
2 files changed
+24
-1
No files matched your search
+2
-1
@@ -68,7 +68,8 @@
|
|||||||
"registry:write": "node tools/registry.js --input registry.json",
|
"registry:write": "node tools/registry.js --input registry.json",
|
||||||
"registry:read": "node tools/registry.js --output registry.json",
|
"registry:read": "node tools/registry.js --output registry.json",
|
||||||
"registry:clear": "node tools/registry.js --clear",
|
"registry:clear": "node tools/registry.js --clear",
|
||||||
"restart-app": "node tools/restart-app.js"
|
"restart-app": "node tools/restart-app.js",
|
||||||
|
"shutdown": "node tools/shutdown.js"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@rollup/rollup-linux-x64-gnu": "^4.30.1"
|
"@rollup/rollup-linux-x64-gnu": "^4.30.1"
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
// Shutdown a Roku device
|
||||||
|
const rokuTestAutomation = require('roku-test-automation');
|
||||||
|
const ecp = rokuTestAutomation.ecp;
|
||||||
|
const utils = rokuTestAutomation.utils;
|
||||||
|
const Key = rokuTestAutomation.ECP.Key;
|
||||||
|
|
||||||
|
const getEnvVars = require('./get-env-vars');
|
||||||
|
|
||||||
|
const config = getEnvVars(['ROKU_DEV_TARGET']);
|
||||||
|
|
||||||
|
(async () => {
|
||||||
|
utils.setupEnvironmentFromConfig({
|
||||||
|
RokuDevice: {
|
||||||
|
devices: [{
|
||||||
|
host: config.ROKU_DEV_TARGET,
|
||||||
|
password: ''
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
await ecp.sendKeypress(Key.PowerOff);
|
||||||
|
})();
|
||||||
Reference in new issue
Block a user