----- "Eduardo Habkost" <ehabkost@xxxxxxxxxx> wrote: > On Mon, May 11, 2009 at 01:36:26PM -0400, Michael Goldish wrote: > > > > ----- "Mike Burns" <mburns@xxxxxxxxxx> wrote: > > > > > Eduardo Habkost wrote: > <snip> > > > > > > > > Maybe something like (untested): > > > > > > > > for k in params.keys(): > > > > os.putenv("KVM_INSTALL_%s" % (k), params[k]) > > > > > > > > Are all values on 'params' guaranteed to be strings, or they can > be > > > set > > > > to any python value? In the latter case, we could use > > > str(params[k]), or > > > > export only the string parameters. > > > > > > > That's a good idea. I'm not sure about whether the params are all > > > > strings. I'll try it out and respin the patch after. > > > > 1. Not all params are strings -- 'depend' is a list of strings, so > str(params[k]) is a good idea. > > Agreed. Using str(params[k]) won't hurt. > > > > > 2. Why not just pass the parameters via the command line, e.g. > > install_command = my_script.sh param1 param2 > > I think keeping the same convention for parameter passing for custom > scripts makes it easier to make custom scripts that behave similarly > to the predefined rules, but with just a few differences. OK, this makes sense. In any case I think we should accept a command string rather than a script filename, in order to allow both methods of passing parameters. > Also, can't the install rule be used on the cartesian configuration > file? In this case, the install parameters may be specified on a > different config rule. It's certainly possible. We chose to put kvm_install in the control file because currently it's the only test we run only once per job. There is no natural place for kvm_install in kvm_tests.cfg because everything else there gets multiplied. > For example, the Fedora project could use it like this: > > cvs_server = "cvs.fedoraproject.org:/..." > variants: > - CVSF10: > cvs_branch = F10 > - CVSF11: > cvs_branch = F11 > - CVSRawhide: > cvs_branch = devel > > > variants: > - install: > type = kvm_install > mode = custom > install_command = "install_from_fedora_cvs.sh" > - ... > > I used Fedora CVS as an example, but the user may use anything we can > imagine, to store KVM code (or pointer to its), possibly having > different branches. This can be done, though the order and syntax of the 'variants' blocks should be different, more like: variants: - kvm_install: cvs_server = "cvs.fedoraproject.org:/..." type = kvm_install mode = custom install_command = "install_from_fedora_cvs.sh" - everything_else_in_kvm_tests.cfg: <tests> ... <guests> ... <smp/up> ... <ide/scsi/virtio_blk> ... variants: - CVSF10: kvm_install: cvs_branch = F10 - CVSF11: kvm_install: cvs_branch = F11 - CVSRawhide: kvm_install: cvs_branch = devel # test sets variants: - nightly: ... That is, assuming you want to - install KVM from F10 branch - run all tests - install KVM from F11 branch - run all tests - install KVM from devel branch - run all tests If you meant something different please correct me. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html