List of minor improvements to this cli site extention: * Introduce a short option '-x' in addition to the already present '--extra-cartesian-config' long option * Allow multiple instances of extra cartesian config command line parameters, example: -x 'only foo' -x 'mem=2048' * Updated README to match these changes and fix a typo
Signed-off-by: Cleber Rosa <[email protected]> --- contrib/virt/README | 12 ++++++------ contrib/virt/site_job.py | 5 +++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/contrib/virt/README b/contrib/virt/README index f7be9b3..fbf8ce7 100644 --- a/contrib/virt/README +++ b/contrib/virt/README @@ -20,7 +20,7 @@ a job that will fail and waste developer time. Instalation: ------------ -1) copy the site_job.py file to <autotest_root>/cli/, +1) copy (or link) the site_job.py file to <autotest_root>/cli/, usually /usr/local/autotest/cli. 2) validate it is working by running: @@ -31,7 +31,7 @@ The output should include the added options: ... -T, --template Control file is actually a template - --extra-cartesian-config=EXTRA_CARTESIAN_CONFIG + -x EXTRA_CARTESIAN_CONFIG, --extra-cartesian-config=EXTRA_CARTESIAN_CONFIG Add extra configuration to the cartesian config file --timestamp Add a timestamp to the name of the job --koji-arch=KOJI_ARCH @@ -56,7 +56,7 @@ use them only as a reference and adapt the examples to your scenario: # <autotest_root>/cli/atest job create -s -m "[email protected]" \ -f "<autotest_root>/contrib/virt/control.template" -T --timestamp \ - --extra-cartesian-config='only qemu-git..sanity' "Upstream qemu.git sanity" + -x 'only qemu-git..sanity' "Upstream qemu.git sanity" 2) To run a test with specific packages built on koji: @@ -65,10 +65,10 @@ use them only as a reference and adapt the examples to your scenario: --koji-tag=f15 --koji-pkg=':qemu-kvm:qemu-kvm,qemu-img,qemu-kvm-tools' \ --koji-pkg='seabios' --koji-pkg='vgabios' --koji-pkg=':gpxe:gpxe-roms-qemu' \ --koji-pkg=':spice-server:spice-server' \ - --extra-cartersian-config='only f15-koji..sanity' "Fedora 15 Koji Sanity" + -x 'only f15-koji..sanity' "Fedora 15 Koji Sanity" -Contribute by (who to bug): ---------------------------- +Contributed by (who to bug): +---------------------------- Cleber Rosa ([email protected]) Lucas Meneghel Rodrigues ([email protected]) diff --git a/contrib/virt/site_job.py b/contrib/virt/site_job.py index e75b438..98c738b 100644 --- a/contrib/virt/site_job.py +++ b/contrib/virt/site_job.py @@ -24,7 +24,8 @@ class site_job_create(job.job_create): super(site_job_create, self).__init__() self.parser.add_option('-T', '--template', action='store_true', help='Control file is actually a template') - self.parser.add_option('--extra-cartesian-config', + self.parser.add_option('-x', '--extra-cartesian-config', + action='append', help='Add extra configuration to the cartesian ' 'config file') self.parser.add_option('--timestamp', action='store_true', @@ -131,7 +132,7 @@ class site_job_create(job.job_create): ''' extra = [] if self.command_line_options.extra_cartesian_config: - extra.append(self.command_line_options.extra_cartesian_config) + extra += self.command_line_options.extra_cartesian_config if self.command_line_options.koji_tag: extra.append("koji_tag = %s" % self.command_line_options.koji_tag) -- 1.7.4.4 _______________________________________________ Autotest mailing list [email protected] http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
