Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 924520 Details for
Bug 857090
beaker-wizard: [RFE] add RhtsRequires into options/skeleton
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
support for rhtsrequires="library(perl/lib1) ..." in <skeleton>, the correct patch
patch (text/plain), 6.27 KB, created by
Martin Žember
on 2014-08-06 15:15:06 UTC
(
hide
)
Description:
support for rhtsrequires="library(perl/lib1) ..." in <skeleton>, the correct patch
Filename:
MIME Type:
Creator:
Martin Žember
Created:
2014-08-06 15:15:06 UTC
Size:
6.27 KB
patch
obsolete
>diff --git a/Client/src/bkr/client/wizard.py b/Client/src/bkr/client/wizard.py >index 61407dc..31da8da 100755 >--- a/Client/src/bkr/client/wizard.py >+++ b/Client/src/bkr/client/wizard.py >@@ -1,3 +1,4 @@ >+#!/usr/bin/python > > # This program is free software; you can redistribute it and/or modify > # it under the terms of the GNU General Public License as published by >@@ -343,6 +344,7 @@ > > # Regular expressions > RegExpPackage = re.compile("^(?![._+-])[.a-zA-Z0-9_+-]+(?<![._-])$") >+RegExpRhtsRequires = re.compile("^(?![._+-])[.a-zA-Z0-9_+-/()]+(?<![._-])$") > RegExpPath = re.compile("^(?![/-])[a-zA-Z0-9/_-]+(?<![/-])$") > RegExpTestName = re.compile("^(?!-)[a-zA-Z0-9-_]+(?<!-)$") > RegExpBug = re.compile("^\d+$") >@@ -416,7 +418,7 @@ > </license> > </licenses> > <skeletons> >- <skeleton name="skel1"> >+ <skeleton name="skel1" requires="gdb" rhtsrequires="library(perl/lib1) library(scl/lib2)"> > This is skeleton 1 example. > </skeleton> > <skeleton name="skel2"> >@@ -951,6 +953,10 @@ def __init__(self, argv=None, load_user_prefs=True): > action="append", > metavar="PACKAGES", > help="required packages [%s]" % self.pref.getPackage()) >+ groupMeta.add_option("-Q", >+ dest="rhtsrequires", >+ action="append", >+ help="rhts-required libraries") > groupMeta.add_option("-t", > dest="time", > help="test time [%s]" % self.pref.getTime()) >@@ -1054,6 +1060,7 @@ def archs(self): return [ self.opt.archs, [] ] > def releases(self): return [ self.opt.releases, [] ] > def runfor(self): return [ self.opt.runfor, [self.pref.getPackage()] ] > def requires(self): return [ self.opt.requires, [self.pref.getPackage()] ] >+ def rhtsrequires(self): return [ self.opt.rhtsrequires, [] ] > def time(self): return [ self.opt.time, self.pref.getTime() ] > def priority(self): return [ self.opt.priority, self.pref.getPriority() ] > def confidential(self): return [ self.opt.confidential, self.pref.getConfidential() ] >@@ -1070,8 +1077,6 @@ def path(self): return [ self.opt.path, "" ] > def name(self): return [ self.opt.name, "a-few-descriptive-words" ] > def bugs(self): return [ self.opt.bugs, [] ] > >- >- > class Inquisitor: > """ > Father of all Inquisitors >@@ -2045,6 +2050,24 @@ def validItem(self, item): > return RegExpPackage.match(item) > > >+class RhtsRequires(MultipleChoice): >+ """ List of packages installed by yum, usually used for libraries """ >+ >+ def init(self): >+ self.name = "RhtsRequired packages" >+ self.question = "RhtsRequires: packages to install later via yum, e.g. beaker libraries" >+ self.description = """Just write a list of packages (e.g. libraries) >+ which should be automatically installed on the test system by yum.""" >+ self.list = [] >+ self.sort = True >+ self.emptyListMeaning = "None" >+ self.common = False >+ self.default(self.options.rhtsrequires()) >+ >+ def validItem(self, item): >+ return RegExpRhtsRequires.match(item) >+ >+ > class Skeleton(SingleChoice): > """ Skeleton to be used for creating the runtest.sh """ > >@@ -2422,6 +2445,9 @@ def init(self): > self.list.extend(findNodeNames(self.options.pref.skeletons, "skeleton")) > self.common = False > self.default(self.options.skeleton()) >+ self.requires = None >+ self.rhtsrequires = None >+ > > def replaceVariables(self, xml, test = None): > """ Replace all <variable> tags with their respective values """ >@@ -2469,6 +2495,20 @@ def getRuntest(self, test = None): > skeleton = re.sub("\n\s+$", "\n", skeleton) > return dedentText(skeleton) > >+ def getRhtsRequires(self): >+ """ Return packages/libraries listed in the arguments of a skeleton, if any """ >+ # get the template from predefined or user skeletons >+ skeleton = findNode(self.skeletons, "skeleton", self.data) \ >+ or findNode(self.options.pref.skeletons, "skeleton", self.data) >+ if not skeleton: >+ return None >+ try: >+ rhtsrequires = skeleton.getAttribute("rhtsrequires") >+ return rhtsrequires >+ except: >+ print "getRhtsRequires exception" >+ >+ > def getMakefile(self, type, testname, version, author, reproducers, meta): > """ Return Makefile skeleton """ > >@@ -2606,6 +2646,8 @@ def init(self): > self.author = Author(self.options) > self.email = Email(self.options) > >+ self.rhtsrequires = RhtsRequires(self.options, suggest = self.skeleton.getRhtsRequires()) >+ > # we escape review only in force mode > if not self.options.force(): self.confirm = True > if not self.confirm: self.format() >@@ -2634,6 +2676,7 @@ def format(self): > print > self.runfor.format() > self.requires.format() >+ self.rhtsrequires.format() > self.archs.format() > self.releases.format() > self.version.format() >@@ -2672,7 +2715,7 @@ def edit(self, checkOnly = False): > > # check all fields for matching string (and edit if not checking only) > for field in self.testname, self.package, self.namespace, self.runfor, \ >- self.requires, self.package, self.releases, self.version, \ >+ self.requires, self.rhtsrequires, self.package, self.releases, self.version, \ > self.time, self.desc, self.destructive, self.archs, \ > self.path, self.priority, self.confidential, self.license, \ > self.skeleton, self.author, self.email, self.testname.prefix, \ >@@ -2752,7 +2795,8 @@ def formatMakefile(self): > self.type.formatMakefileLine(name = "Type") + > self.time.formatMakefileLine(name = "TestTime") + > self.runfor.formatMakefileLine(name = "RunFor") + >- self.requires.formatMakefileLine(name = "Requires") + >+ self.requires.formatMakefileLine(name = "Requires") + >+ self.rhtsrequires.formatMakefileLine(name = "RhtsRequires") + > provides + > self.priority.formatMakefileLine() + > self.license.formatMakefileLine() +
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 857090
:
922910
|
924261
| 924520