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

Make sl4a optional by default. #87

Merged
merged 5 commits into from
Jan 31, 2017
Merged

Make sl4a optional by default. #87

merged 5 commits into from
Jan 31, 2017

Conversation

xpconanfan
Copy link
Collaborator

Fixes #80

# TODO(angli): This function shall be refactored to accommodate all services
# and not have hard coded switch for SL4A when b/29157104 is done.
def start_services(self, skip_sl4a=False):
def start_services(self):
"""Starts long running services on the android device.

1. Start adb logcat capture.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

List of one element?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -567,14 +558,14 @@ def load_snippet(self, name, package):
self._snippet_clients[name] = client
setattr(self, name, client)

def _start_sl4a(self):
"""Create an sl4a connection to the device.
def load_sl4a(self):
Copy link
Collaborator

@adorokhine adorokhine Jan 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The examples in readme.md will need updating accordingly since they use sl4a currently.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In docs/website too.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Collaborator

@adorokhine adorokhine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM. Leaving detailed docs review to David as he's more familiar with the docs/examples.

@adorokhine
Copy link
Collaborator

sl4a_shell will have to be modified to call load_sl4a()

@adorokhine
Copy link
Collaborator

Says Travis CB failed... could you take a look?

@xpconanfan
Copy link
Collaborator Author

Actually looks like a flake in the unit test

=================================== FAILURES ===================================
____________________ UtilsTest.test_start_standing_subproc _____________________
self = <tests.mobly.utils_test.UtilsTest testMethod=test_start_standing_subproc>
    def test_start_standing_subproc(self):
        with self.assertRaisesRegexp(utils.Error,
                                     "Process .* has terminated"):
>           utils.start_standing_subprocess("sleep 0", check_health_delay=0.1)
E           AssertionError: Error not raised
tests/mobly/utils_test.py:32: AssertionError

@xpconanfan xpconanfan merged commit e23523e into master Jan 31, 2017
@xpconanfan xpconanfan deleted the sl4a branch January 31, 2017 22:13
@adorokhine adorokhine mentioned this pull request Jan 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants