Skip to content
This repository was archived by the owner on May 27, 2024. It is now read-only.

Commit 1fdd3bf

Browse files
committed
remove tunnel server, use androidx.test.runner instead of android.support.test.runner
1 parent e4c73b0 commit 1fdd3bf

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

main.go

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,11 @@ import (
1313
"net"
1414
"net/http"
1515
"net/http/httputil"
16-
"net/url"
1716
"os"
1817
"os/exec"
1918
"os/signal"
2019
"os/user"
2120
"path/filepath"
22-
"regexp"
2321
"strconv"
2422
"strings"
2523
"sync"
@@ -528,7 +526,7 @@ func main() {
528526
fStop := cmdServer.Flag("stop", "stop server").Bool()
529527
cmdServer.Flag("addr", "listen port").Default(":7912").StringVar(&listenAddr) // Create on 2017/09/12
530528
cmdServer.Flag("log", "log file path when in daemon mode").StringVar(&daemonLogPath)
531-
fServerURL := cmdServer.Flag("server", "server url").Short('t').String()
529+
// fServerURL := cmdServer.Flag("server", "server url").Short('t').String()
532530
fNoUiautomator := cmdServer.Flag("nouia", "do not start uiautoamtor when start").Bool()
533531

534532
// CMD: version
@@ -574,17 +572,17 @@ func main() {
574572
}
575573
}
576574

577-
serverURL := *fServerURL
578-
if serverURL != "" {
579-
if !regexp.MustCompile(`https?://`).MatchString(serverURL) {
580-
serverURL = "http://" + serverURL
581-
}
582-
u, err := url.Parse(serverURL)
583-
if err != nil {
584-
log.Fatal(err)
585-
}
586-
_ = u
587-
}
575+
// serverURL := *fServerURL
576+
// if serverURL != "" {
577+
// if !regexp.MustCompile(`https?://`).MatchString(serverURL) {
578+
// serverURL = "http://" + serverURL
579+
// }
580+
// u, err := url.Parse(serverURL)
581+
// if err != nil {
582+
// log.Fatal(err)
583+
// }
584+
// _ = u
585+
// }
588586

589587
if _, err := os.Stat("/sdcard/tmp"); err != nil {
590588
os.MkdirAll("/sdcard/tmp", 0755)
@@ -680,7 +678,8 @@ func main() {
680678
Args: []string{"am", "instrument", "-w", "-r",
681679
"-e", "debug", "false",
682680
"-e", "class", "com.github.uiautomator.stub.Stub",
683-
"com.github.uiautomator.test/android.support.test.runner.AndroidJUnitRunner"},
681+
"com.github.uiautomator.test/androidx.test.runner.AndroidJUnitRunner"}, // update for android-uiautomator-server.apk>=2.3.2
682+
//"com.github.uiautomator.test/android.support.test.runner.AndroidJUnitRunner"},
684683
Stdout: os.Stdout,
685684
Stderr: os.Stderr,
686685
MaxRetries: 1, // only once

0 commit comments

Comments
 (0)