diff options
author | Yan Wang <yawanng@google.com> | 2019-07-17 16:07:14 -0700 |
---|---|---|
committer | Yan Wang <yawanng@google.com> | 2019-07-17 16:07:14 -0700 |
commit | ef54d7cf201032624d1b5b755713d23d7e23daa0 (patch) | |
tree | 605a4bd7167ff33473f627cbb726585f2491ef51 /startop/scripts/app_startup | |
parent | 315ae2d4c4396fa4f19f5a2be0d73afb9cfa7b31 (diff) |
Fix a failed test because of passing wrong type of arguments.
Test: pytest run_app_with_prefetch_test.py
Change-Id: Id416e67bac8fe3487e5ea85cc488bda0988d513b
Diffstat (limited to 'startop/scripts/app_startup')
-rw-r--r-- | startop/scripts/app_startup/run_app_with_prefetch.py | 2 | ||||
-rw-r--r-- | startop/scripts/app_startup/run_app_with_prefetch_test.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/startop/scripts/app_startup/run_app_with_prefetch.py b/startop/scripts/app_startup/run_app_with_prefetch.py index 8a9135bb3dea..464742d16d13 100644 --- a/startop/scripts/app_startup/run_app_with_prefetch.py +++ b/startop/scripts/app_startup/run_app_with_prefetch.py @@ -101,7 +101,7 @@ def parse_options(argv: List[str] = None): return parser.parse_args(argv) -def validate_options(args: argparse.Namespace) -> Tuple[bool, RunCommandArgs]: +def validate_options(args: RunCommandArgs) -> Tuple[bool, RunCommandArgs]: """Validates the activity and trace file if needed. Returns: diff --git a/startop/scripts/app_startup/run_app_with_prefetch_test.py b/startop/scripts/app_startup/run_app_with_prefetch_test.py index a642385b37d7..8536ce5f917e 100644 --- a/startop/scripts/app_startup/run_app_with_prefetch_test.py +++ b/startop/scripts/app_startup/run_app_with_prefetch_test.py @@ -156,7 +156,8 @@ def test_main(): args = '--package com.fake.package --activity act -s' opts = run.parse_options(shlex.split(args)) - result = run.run_test(opts) + args = run.get_args_from_opts(opts) + result = run.run_test(args) assert result == [('TotalTime', '123')] def test_set_up_adb_env(): |