Merge lp://staging/~liuyq0307/lava-android-test/exclude-shells-commands-hostshells-test-from-list into lp://staging/lava-android-test
Proposed by
Yongqin Liu
Status: | Work in progress |
---|---|
Proposed branch: | lp://staging/~liuyq0307/lava-android-test/exclude-shells-commands-hostshells-test-from-list |
Merge into: | lp://staging/lava-android-test |
Diff against target: |
40 lines (+16/-3) 1 file modified
lava_android_test/provider.py (+16/-3) |
To merge this branch: | bzr merge lp://staging/~liuyq0307/lava-android-test/exclude-shells-commands-hostshells-test-from-list |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Linaro Validation Team | Pending | ||
Review via email: mp+144222@code.staging.launchpad.net |
Description of the change
exclue the shells/
these three tests(shells/
and so that they can not be installed and run, so here is the fix to
exclude them from the list-tests sub command
To post a comment you must log in.
Unmerged revisions
- 234. By Yongqin Liu
-
keep the original change of provider.py for review
- 233. By Yongqin Liu
-
merge with trunk
This is change concerns me a bit:
> def list_test(self): mod(test_ definitions. __path_ _) test_provider_ list() test_prefix append( '%ss' % test_prefix) mod(test_ definitions. __path_ _) append( test_id)
> - return self.list_
> + providers = self.get_
> + avoid_dirs = []
> + for provider in providers:
> + test_prefix = provider.
> + if test_prefix:
> + avoid_dirs.
> + test_list = self.list_
> + if not avoid_dirs:
> + return test_list
> + else:
> + ret_list = []
> + for test_id in test_list:
> + if not test_id in avoid_dirs:
> + ret_list.
> + return ret_list
>
The way avoid_dirs gets built is based on your current naming
convention. Instead of guessing avoid dirs that way, why not do
something like:
def _get_dirs( pathname) : pathname) if os.path.isdir(x)]
return [x for x in os.listdir(
then you could just do: test_definition s.__path_ _)
avoid_dirs = _get_dirs(
I'm not a big fan of the logic for removing those items from the list.
The "if not avoid_dirs:" check isn't needed.