{"action":"created","issue":{"url":"https://api.github.com/repos/avocado-framework/avocado/issues/389","labels_url":"https://api.github.com/repos/avocado-framework/avocado/issues/389/labels{/name}","comments_url":"https://api.github.com/repos/avocado-framework/avocado/issues/389/comments","events_url":"https://api.github.com/repos/avocado-framework/avocado/issues/389/events","html_url":"https://github.com/avocado-framework/avocado/pull/389","id":56261263,"number":389,"title":"avocado.plugins.remote: Unify test locations and use absolute path [v2]","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":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-02T16:51:15Z","updated_at":"2015-02-02T23:04:54Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/avocado-framework/avocado/pulls/389","html_url":"https://github.com/avocado-framework/avocado/pull/389","diff_url":"https://github.com/avocado-framework/avocado/pull/389.diff","patch_url":"https://github.com/avocado-framework/avocado/pull/389.patch"},"body":"this pull request unifies test locations for remote plugin. It might be one of possible solutions to the #352 . There are couple of changes from before.\r\n\r\n1.  set fabric to copy file mode (tests have to be executable)\r\n2.  remote plugin turns each url into aboslute path\r\n3.  parent dirs are copied recursively into $remote_test_dir + $absolute_path\r\n4.  remote execution uses $remote_test_dir + $absolute_path to avoid clashes\r\n5.  remote paths are logged in results\r\n6.  additional support for `--remote-no-copy` execute tests as they are on VM\r\n\r\nI tested various executions and it seems to be more consistent. But I might missed something so please think about it for a while.\r\n\r\nv0: https://github.com/avocado-framework/avocado/pull/361\r\nv1: https://github.com/avocado-framework/avocado/pull/387\r\n\r\nChanges:\r\n\r\n    v1: Added note to use TestLoader to discover test uris (it's under reconstruction\r\n        so wait for it's stabilization)\r\n    v1: Fix rsync with passwordless ssh (not all scenarios tested, but should be\r\n        better then before)\r\n    v1: Fixed typos\r\n    v1: Reworked the `mock` module and put it in `avocado.utils.debug`\r\n    v1: Added support for `--remote-no-copy`/`--vm-no-copy` to use existing tests.\r\n    v2: Use flexmock in unittests instead of custom solution\r\n    v2: Fix unittests per each commit, including vm_unittest\r\n    v2: Fix output plugin command (in case multiple output plugins are in use)"},"comment":{"url":"https://api.github.com/repos/avocado-framework/avocado/issues/comments/72558082","html_url":"https://github.com/avocado-framework/avocado/pull/389#issuecomment-72558082","issue_url":"https://api.github.com/repos/avocado-framework/avocado/issues/389","id":72558082,"user":{"login":"clebergnu","id":447178,"avatar_url":"https://avatars.githubusercontent.com/u/447178?v=3","gravatar_id":"","url":"https://api.github.com/users/clebergnu","html_url":"https://github.com/clebergnu","followers_url":"https://api.github.com/users/clebergnu/followers","following_url":"https://api.github.com/users/clebergnu/following{/other_user}","gists_url":"https://api.github.com/users/clebergnu/gists{/gist_id}","starred_url":"https://api.github.com/users/clebergnu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clebergnu/subscriptions","organizations_url":"https://api.github.com/users/clebergnu/orgs","repos_url":"https://api.github.com/users/clebergnu/repos","events_url":"https://api.github.com/users/clebergnu/events{/privacy}","received_events_url":"https://api.github.com/users/clebergnu/received_events","type":"User","site_admin":false},"created_at":"2015-02-02T23:04:54Z","updated_at":"2015-02-02T23:04:54Z","body":"@ldoktor before digging into the code, I'd like to understand how a given use case (mine, while testing this) should work. Fixed configuration is:\r\n\r\n1) Host: running as my regular local user (cleber), running avocado from `/home/cleber/src/avocado`, a checkout from your branch.\r\n2) Remote: virtual machine running the same OS, and Avocado from the same source code, but installed from an RPM package. Machine has a `root` account only.\r\n\r\nFollowing that use case logic, `$remote_test_dir` is key here. But, it looks like copying the tests over and resolving its location are causing a diversion. Running this:\r\n\r\n`./scripts/avocado run  --remote-host 192.168.122.87 --remote-user root --remote-password 123456 sleeptest`\r\n\r\nWill cause this in the remote machine:\r\n\r\n```\r\nNOT_FOUND /root/avocado/tests/home/cleber/src/avocado/examples/tests/sleeptest.py -> TestNotFoundError: Test /root/avocado/tests/home/cleber/src/avocado/examples/tests/sleeptest.py could not be found in the test dir /usr/share/avocado/tests (or test path does not exist)\r\n```\r\n\r\nSo, it's quite obvious that two different \"test directories\" are mentioned here:\r\n* `/root/avocado/tests`\r\n* `/usr/share/avocado/tests`\r\n\r\nIdeas?"}}