diff options
Diffstat (limited to 'emu_test/test_console/utils/util.py')
-rw-r--r-- | emu_test/test_console/utils/util.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/emu_test/test_console/utils/util.py b/emu_test/test_console/utils/util.py index 8899f483..984ee89c 100644 --- a/emu_test/test_console/utils/util.py +++ b/emu_test/test_console/utils/util.py @@ -69,8 +69,10 @@ CMD_EMPTY_AUTH_TOKEN = '%s \n' % AUTH CMD_EXIT = 'exit\n' SCRIPT_TO_INSTALL_APK = 'install_apk.py' SCRIPT_TO_RUN_ADB_SHELL = 'run_adb_shell.py' +SCRIPT_TO_UNINSTALL_APP = 'uninstall_app.py' PYTHON_INTERPRETER = 'python' CMD_ROTATE = 'rotate\n' +MAIN_APK_PACKAGE = 'com.android.devtools.server' def check_read_until(console_output): @@ -304,3 +306,13 @@ def run_script_run_adb_shell(testcase_call_dir): subprocess.call([PYTHON_INTERPRETER, script_install_apk]) subprocess.Popen([PYTHON_INTERPRETER, script_run_adb_shell]) time.sleep(SETUP_WAIT_TIMEOUT_S) + +def unstall_apps(testcase_call_dir): + """Run Python script to uninstall apps. + + Args: + testcase_call_dir: The directory where the test case is called from. + """ + subprocess.Popen([PYTHON_INTERPRETER, + '%s/%s' % (testcase_call_dir, SCRIPT_TO_UNINSTALL_APP)]) + time.sleep(SETUP_WAIT_TIMEOUT_S) |