[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 13/16] osstest: change the meaning of need_build_host
Roger Pau Monne writes ("[PATCH v4 13/16] osstest: change the meaning of need_build_host"): > Make need_build_host store a string instead of a boolean. This is > later going to be expanded to handle the FreeBSD build jobs. ... > - if {$need_build_host} { catching-otherwise broken allocate-build-host } > + if {[llength $need_build_host]} { > + catching-otherwise broken allocate-build-host $need_build_host > + } I think you mean + if {[llength $need_build_host]} { + catching-otherwise broken { allocate-build-host $need_build_host } + } catching-otherwise takes a script as its second argument. The script can be a whole { } block and can refer to variables in the same scope (since it is invoked with uplevel). Ie, catching-otherwise is a user-defined control construct. You can use it like "if" or something. The omission of the braces in the old code is simply because if the code to be executed is a single argumentless procedure call, they aren't needed. So: > - if {$need_build_host} { catching-otherwise broken prepare-build-host } > + if {[llength $need_build_host]} { > + catching-otherwise broken \ > + prepare-build-host-[string tolower > $need_build_host] Instead: + catching-otherwise broken { + prepare-build-host-[string tolower $need_build_host] + } > + } > -proc need-hosts/build {} { return BUILD } > -proc need-hosts/build-kern {} { return BUILD } > -proc need-hosts/build-libvirt {} { return BUILD } > -proc need-hosts/build-rumprun {} { return BUILD } > -proc need-hosts/build-xtf {} { return BUILD } > +proc need-hosts/build {} { return BUILD_LINUX } > +proc need-hosts/build-kern {} { return BUILD_LINUX } > +proc need-hosts/build-libvirt {} { return BUILD_LINUX } > +proc need-hosts/build-rumprun {} { return BUILD_LINUX } > +proc need-hosts/build-xtf {} { return BUILD_LINUX } I wish I had made these line up neatly! Sorry. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |