diff options
author | Chester Hsieh <dunno@google.com> | 2021-03-08 22:15:03 -0800 |
---|---|---|
committer | TreeHugger Robot <treehugger-gerrit@google.com> | 2021-03-31 01:36:43 +0000 |
commit | cbc97e82164ce1880ffe6eae31e562765e1f916e (patch) | |
tree | 5b6bf06db39ed6388815f05dde8f31d394399539 /android-uitests/README.md | |
parent | 74cf6f83c826137e72a5d559ae2410e70b7258dd (diff) | |
download | idea-cbc97e82164ce1880ffe6eae31e562765e1f916e.tar.gz |
Update UI test instructions for remote desktop
Bug: N/A
Test: N/A`
Change-Id: I4463f07ef9ea82723f334cc6e93a895f2f3eb806
Diffstat (limited to 'android-uitests/README.md')
-rw-r--r-- | android-uitests/README.md | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/android-uitests/README.md b/android-uitests/README.md index c50e8096914..e3d4af43cf3 100644 --- a/android-uitests/README.md +++ b/android-uitests/README.md @@ -46,4 +46,19 @@ Another option is to run a server first like this: And set the argument `--test_env=DISPLAY=:1234` to tell the test to use that one. Then you can connect to it as described above. +## Running through remote desktop +If the test is running through remote desktop, the main display of remote desktop may not be ":0". +If this is the case, run the following to get the main display's string: + + ps -u $(id -u) -o pid= \ + | xargs -I PID -r cat /proc/PID/environ 2> /dev/null \ + | tr '\0' '\n' \ + | grep ^DISPLAY=: \ + | sort -u + +(Courtesy of: https://superuser.com/questions/647464/how-to-get-the-display-number-i-was-assigned-by-x) + +Then use the result of the above query in the command earlier. I.e.: + + bazel test //tools/adt/idea/android-uitests:GuiTestRuleTest --spawn_strategy=standalone --test_env=DISPLAY=<insert_display_string_here> |