{"action":"created","issue":{"url":"https://api.github.com/repos/avocado-framework/avocado/issues/810","labels_url":"https://api.github.com/repos/avocado-framework/avocado/issues/810/labels{/name}","comments_url":"https://api.github.com/repos/avocado-framework/avocado/issues/810/comments","events_url":"https://api.github.com/repos/avocado-framework/avocado/issues/810/events","html_url":"https://github.com/avocado-framework/avocado/pull/810","id":109083110,"number":810,"title":"avocado.core.loader: introduce --loaders to avocado run [v1]","user":{"login":"ldoktor","id":1074021,"avatar_url":"https://avatars.githubusercontent.com/u/1074021?v=3","gravatar_id":"","url":"https://api.github.com/users/ldoktor","html_url":"https://github.com/ldoktor","followers_url":"https://api.github.com/users/ldoktor/followers","following_url":"https://api.github.com/users/ldoktor/following{/other_user}","gists_url":"https://api.github.com/users/ldoktor/gists{/gist_id}","starred_url":"https://api.github.com/users/ldoktor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ldoktor/subscriptions","organizations_url":"https://api.github.com/users/ldoktor/orgs","repos_url":"https://api.github.com/users/ldoktor/repos","events_url":"https://api.github.com/users/ldoktor/events{/privacy}","received_events_url":"https://api.github.com/users/ldoktor/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/avocado-framework/avocado/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-30T13:10:17Z","updated_at":"2015-09-30T14:31:54Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/avocado-framework/avocado/pulls/810","html_url":"https://github.com/avocado-framework/avocado/pull/810","diff_url":"https://github.com/avocado-framework/avocado/pull/810.diff","patch_url":"https://github.com/avocado-framework/avocado/pull/810.patch"},"body":"Hello guys,\r\n\r\nFirst commit improves the output when plugin fails to initialize. Then I refactor the inner_runner and move it from a separate plugin (which was in reality already quite intrusively spread across loaders) directly into the file loader. Second to last commit makes it possible to query mapping on uninitialized plugin, which is essential for some features of --loaders.\r\n\r\nThe last big commit adds the new functionality. It allows specifying either loader plugins (`@vt`, `@file`), test type (`VT`, `SIMPLE`, `INSTRUMENTED`) and for some plugins it allows even extra params (`@file:/bin/echo`, `INNER_RUNNER:/bin/echo -e -n`). There is a hardcoded keyword `DEFAULT` which injects the unused loader plugins in that position (this means `DEFAULT` => `@vt @file`, but `DEFAULT @vt` => `@file @vt`. It doesn't repeat already used loaders when specified by plugin name. It does repeat the ones specified by test type: `SIMPLE @DEFAULT` => `@file:SIMPLE @vt @file`).\r\n\r\nThe _test type_ is not enforced by the loader_proxy. First I implemented it there, but it did not scale and the only plugin which implements multiple test types is the `file_loader`, therefor I made it optional via the `extra_params`. I still feel it's a bit fragile, because we must trust loader plugin developers to implement such feature for loaders with multiple test types. On the other hand this is more flexible and currently covers all scenarios.\r\n\r\nNote in RFC it was mentioned we should support:\r\n\r\n* `avocado run --loader avocado a.py --loader simple b.py --loader wrapped:\"/usr/bin/test-runner -x -y -z\" c.py --loader auto /test-dir/`: multiple test sets, each with a different explicit test loader.\r\n\r\nThis was not implemented as argparse doesn't support mixed arguments (at least the last time I checked, which was while working on the multiplexer, where I wanted to support similar feature).\r\n\r\nv0: https://github.com/avocado-framework/avocado/pull/801\r\n\r\nChanges:\r\n\r\n    v1: Documentation\r\n    v1: Selftests\r\n    v1: Support to query for loaders (separate commit)\r\n    v1: Adjusted messages and the usage of assert"},"comment":{"url":"https://api.github.com/repos/avocado-framework/avocado/issues/comments/144430438","html_url":"https://github.com/avocado-framework/avocado/pull/810#issuecomment-144430438","issue_url":"https://api.github.com/repos/avocado-framework/avocado/issues/810","id":144430438,"user":{"login":"lmr","id":296807,"avatar_url":"https://avatars.githubusercontent.com/u/296807?v=3","gravatar_id":"","url":"https://api.github.com/users/lmr","html_url":"https://github.com/lmr","followers_url":"https://api.github.com/users/lmr/followers","following_url":"https://api.github.com/users/lmr/following{/other_user}","gists_url":"https://api.github.com/users/lmr/gists{/gist_id}","starred_url":"https://api.github.com/users/lmr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmr/subscriptions","organizations_url":"https://api.github.com/users/lmr/orgs","repos_url":"https://api.github.com/users/lmr/repos","events_url":"https://api.github.com/users/lmr/events{/privacy}","received_events_url":"https://api.github.com/users/lmr/received_events","type":"User","site_admin":false},"created_at":"2015-09-30T14:31:54Z","updated_at":"2015-09-30T14:31:54Z","body":"That's some nice work you've got there, @ldoktor. Please change a few things in the documentation and I think we'll be good to go (I'm re-testing)."}}