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

Initialize flag variable "header" to true in /lib/util/devutil.js #615

Merged
merged 1 commit into from
Jun 11, 2017
Merged

Initialize flag variable "header" to true in /lib/util/devutil.js #615

merged 1 commit into from
Jun 11, 2017

Conversation

thinkhy
Copy link
Member

@thinkhy thinkhy commented Jun 11, 2017

Seems we intended to filter header line in the output of "ps comm", it's supposed to initialize flag variable "header" to true.

@sorccu
Copy link
Member

sorccu commented Jun 11, 2017 via email

@sorccu sorccu merged commit 3896e18 into openstf:master Jun 11, 2017
@thinkhy
Copy link
Member Author

thinkhy commented Jun 11, 2017

I found it when reviewed code in the component of "device" in order to add a device plugin for testing.

Actually in the function of "listPidsByComm" in devutil.js, there still exists an incompatibility problem as the shell command "ps comm" is invalid in some devices such as Google Pixel.
Below is the output when I issued "ps com" in Pixel:

 1|sailfish:/ $ ps com
 bad pid 'com'
 1|sailfish:/ $ echo $?
 1

So I suggest to replace "ps comm" with "ps" which is workable for all the Android device.

@sorccu
Copy link
Member

sorccu commented Jun 11, 2017

Hmm... that's unfortunate. Unfortunately Google doesn't sell the Pixel here so I've never been able to try one myself. I do know that Pixel devices are working in STF, though. Could you perhaps attempt to create a patch?

@thinkhy
Copy link
Member Author

thinkhy commented Jun 11, 2017

Pixel is not common in China neither, someone sent me this device from US.
OK, I'll create a new patch which only replace "ps comm" with "ps" in listPidsByComm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants