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

Headless emulator script should use pid argument for logcat #22261

Open
jdm opened this issue Nov 23, 2018 · 3 comments
Open

Headless emulator script should use pid argument for logcat #22261

jdm opened this issue Nov 23, 2018 · 3 comments

Comments

@jdm
Copy link
Member

@jdm jdm commented Nov 23, 2018

We have code that can determine the pid of the servo app after starting it (see ./mach run --android), so we should use that code to pass a pid argument to logcat and see all of the relevant output for the process.

@highfive
Copy link

@highfive highfive commented Nov 23, 2018

@SimonSapin
Copy link
Member

@SimonSapin SimonSapin commented Nov 24, 2018

This is the code you mean, right?

script = [
"am force-stop org.mozilla.servo",
]
json_params = shell_quote(json.dumps(params))
extra = "-e servoargs " + json_params
rust_log = env.get("RUST_LOG", None)
if rust_log:
extra += " -e servolog " + rust_log
script += [
"am start " + extra + " org.mozilla.servo/org.mozilla.servo.MainActivity",
"sleep 0.5",
"echo Servo PID: $(pidof org.mozilla.servo)",
"exit"
]

@jdm
Copy link
Member Author

@jdm jdm commented Nov 24, 2018

Yep.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.