Excerpts from Nick Coghlan's message of 2012-12-10 12:26:49 +1000:
Design Details:
The proposal is fairly simple:
- create a new standard task (maintained in the main beaker repo) that
accepts parameters defining:
- a Git URL to clone
- a test execution command to be run from the base directory of the
clone
- the task's runtest.sh would take care of any setup-and-teardown needed
to clone the repo, run the test and then delete the repo again
- the exact Git changeset id for the checked out repo would be reported
as part of the test details (for cases where the submitted URL doesn't
specify a particular tag or revision)
- (What else would we need in the task parameters to make up for the
lack of per-test-case tasks? Probably everything that would otherwise be
set in runtest.sh)
Possible additions:
- while the standard version of the task would permit arbitrary Git
URLs, it likely wouldn't be hard to create a modified version that only
allowed URLs from a defined subset of hosts.
Actually implementing this isn't high on my priority at the moment, but
if the above idea seems workable, then it should be a lot easier to make
happen than an approach that requires server side changes.
I think this approach would work, but essentially it is a hack and would
unfortunately not hold much value for anyone. The reason is that the
resultant recipe would look weird and any result reporting tools
(including Beaker's job matrix) would be rendered unusable, because the
tasks no longer appear under their real names. Even if you do include
hacks to export the TEST env var correctly for the tasks, ultimately the
recipe will go from looking like
Recipe
/distribution/install
/kernel/test/something
/kernel/test/otherthing
...
to instead looking like
Recipe
/distribution/install
/distribution/run_from_git
/distribution/run_from_git
/distribution/run_from_git
...
Running tasks from git really needs to be supported in the harness.
--
Dan Callaghan <dcallagh(a)redhat.com>
Software Engineer, Infrastructure Engineering and Development
Red Hat, Inc.