Running browsertests on crow android emulator

136 views
Skip to first unread message

Stefan Zager

unread,
Mar 25, 2021, 6:24:16 PM3/25/21
to Chromium-dev
I'm trying to do this and running into problems. The command I'm trying is:

./out/Android-Emulator/bin/run_content_browsertests --gtest-filter All/SitePerProcessBrowserTest.NoResizeAfterIframeLoad/0

Here's the terminal output:


Here's a snippet of the logcat from the device:


Any insight will be greatly appreciated.

Haiyang Pan

unread,
Mar 25, 2021, 6:36:44 PM3/25/21
to sza...@chromium.org, Chromium-dev
The logcat has the following line which indicates a permission issue:
Failed to redirect stream to file: /sdcard/Download/temp_file-3f1ab3da3c883.gtest_out: Permission denied

The following command will launch emulator on the fly when running tests. Can you give it a try (assuming under linux env and on android marshmallow)?
This doc contains more details, if you are interested.

./out/Android-Emulator/bin/run_content_browsertests --gtest-filter All/SitePerProcessBrowserTest.NoResizeAfterIframeLoad/0 --avd-config tools/android/avd/proto/generic_android23.textpb



--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAHOQ7J_SaiQ6AQzUTMjLLwtzQ4x6VUKdoFXsP%3DAFXJNou9n%3DOA%40mail.gmail.com.


--
Best,
Haiyang

Stefan Zager

unread,
Mar 25, 2021, 7:16:56 PM3/25/21
to Haiyang Pan, Stefan Zager, Chromium-dev
On Thu, Mar 25, 2021 at 3:35 PM Haiyang Pan <hy...@google.com> wrote:
The logcat has the following line which indicates a permission issue:
Failed to redirect stream to file: /sdcard/Download/temp_file-3f1ab3da3c883.gtest_out: Permission denied

The following command will launch emulator on the fly when running tests. Can you give it a try (assuming under linux env and on android marshmallow)?
This doc contains more details, if you are interested.

./out/Android-Emulator/bin/run_content_browsertests --gtest-filter All/SitePerProcessBrowserTest.NoResizeAfterIframeLoad/0 --avd-config tools/android/avd/proto/generic_android23.textpb

That didn't work for me: https://pastebin.com/gJpS8tTE

Can I just `adb shell chmod 755 <directory>` on the running emulator?

Stefan Zager

unread,
Mar 25, 2021, 7:23:36 PM3/25/21
to Stefan Zager, Haiyang Pan, Chromium-dev
u
I noticed that the emulator config file looks weird:

$ cat tools/android/avd/proto/generic_android23.textpb
# Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# Configuration for a generic x86 android-23 AVD.

emulator_package {
  package_name: "chromium/third_party/android_sdk/public/emulator"
  version: "xhyuoquVvBTcJelgRjMKZeoBVSQRjB7pLVJPt5C9saIC"
  dest_path: ".emulator_sdk"
}

system_image_package {
  package_name: "chromium/third_party/android_sdk/public/system-images/android-23/google_apis/x86"
  version: "npuCAATVbhmywZwGhI3tMoECTrBBzzyJLpjAPXqtmYYC"
  dest_path: ".emulator_sdk"
}
system_image_name: "system-images;android-23;google_apis;x86"

avd_package {
  package_name: "chromium/third_party/android_sdk/public/avds/android-23/google_apis/x86"
  version: "xCANtnG4XemtJK2q8j-RTksfa82R3YDiJFKZYKNxJxMC"
  dest_path: ".android"
}


All of the 'package_name' fields begin with 'chromium/', rather than 'src/'. Could that be  

Haiyang Pan

unread,
Mar 25, 2021, 7:31:18 PM3/25/21
to Stefan Zager, Chromium-dev
It looks like there is a typo in your command:
  1. $ ./out/Android-Emulator/bin/run_content_browsertests --gtest-filter All/SitePerProcessBrowserTest.NoResizeAfterIframeLoad/0 --adv-config tools/android/avd/proto/generic_android23.textpb

Instead of "--adv-config", it should be "--avd-config." Also, can you double check if all the prerequisites are met?
--
Best,
Haiyang

Stefan Zager

unread,
Mar 25, 2021, 7:44:30 PM3/25/21
to Haiyang Pan, Stefan Zager, Chromium-dev
On Thu, Mar 25, 2021 at 4:29 PM Haiyang Pan <hy...@google.com> wrote:
It looks like there is a typo in your command:
  1. $ ./out/Android-Emulator/bin/run_content_browsertests --gtest-filter All/SitePerProcessBrowserTest.NoResizeAfterIframeLoad/0 --adv-config tools/android/avd/proto/generic_android23.textpb

PEBKAC -- thanks for catching that, it's working now!
Reply all
Reply to author
Forward
0 new messages