Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uninstall apps after timeout or installation failure #7970

Merged
merged 8 commits into from
Oct 21, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
address feedback
  • Loading branch information
Katya Sokolova committed Oct 19, 2021
commit fc2e059b363e331916d0180ec53a054aa0486ea3
Original file line number Diff line number Diff line change
@@ -47,7 +47,12 @@ if ($ev) {
$process.WaitForExit()
[Console]::Out.Flush()
Write-Output "User command timed out after $command_timeout seconds!"
& "C:\adb\platform-tools\adb.exe" uninstall `"$package_name`"
$adb_path=dotnet xharness android state --adb
greenEkatherine marked this conversation as resolved.
Show resolved Hide resolved
$packages=& $adb_path shell pm list packages net.dot
$split_packages=$packages.split(':')
For ($i=1; $i -lt $split_packages.Length; $i+=2) {
echo $split_packages[$i] | %{&$adb_path uninstall $_}
greenEkatherine marked this conversation as resolved.
Show resolved Hide resolved
}
} else {
$exit_code = $process.ExitCode
Write-Output "User command ended with $exit_code"