On 11/12/2012 06:52 AM, Senthil Kumaran S wrote:
Hi,
On Monday 12 November 2012 05:40 PM, Senthil Kumaran S wrote:
I just pushed in support for pulling from bzr branches. The last thing pending is, support for pulling specific revisions.
Support for pulling specific revisions from the repository which holds test definitions is pushed in! Use the job file attached in this email to check this feature.
I just spent a little time looking at the branch and have a few comments:
= the action changes:
We now have:
"command": "lava_test_shell", "parameters": { "testdef_repos": [ {"repo1" : "git://git.linaro.org/people/stylesen/sampletestdefs.git", "testdef1": {"test": "testdef.yaml", "files": ["testsample.sh", "tester.sh"]}, "testdef2": {"test": "testdef.yaml", "files": ["testsample.sh", "tester.sh"]} }, {"repo2" : "git://git.linaro.org/people/stylesen/sampletestdefs.git", "testdef": {"test": "testdef.yaml", "files": ["testsample.sh", "tester.sh"]} }], "timeout": 1800 }
There are 2 things I don't like. The "testdefX" thing and the "files". I see where you are coming from on the "files" piece, but I think we should just pull in the whole repository for the test. I see how you are trying to eliminate copying the same stuff multiple times. However, we can probably be smart and have a directory on the target that has a single copy of each repo and then do symlinks to it for each test. This would then allow us to do a definition like:
"command": "lava_test_shell", "parameters": { "testdef_repos": [ { "git-repo" : "foo.git", "testdefs": [ "testdef1.yaml", "t2.yaml" ] ] }], "timeout": 1800 }
= _get_test_def_repo: as noted in my proposal, lets not try and guess between git/bzr. The code we have here misses things like cloning a repo using HTTP which would be hard to guess about.
= dict.get(key) logic: Most of the dispatcher uses dict[key]. Lets change to use that to keep things consistent.
= _configure_target: The testdef_repos and testdef_urls snippets are making this function grow pretty large. Let's break those out into their own functions.