diff mbox

[v4,14/16] osstest: add support for FreeBSD buildjobs to sg-run-job

Message ID 20170706144227.36580-15-roger.pau@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Roger Pau Monné July 6, 2017, 2:42 p.m. UTC
Add support and introduce a FreeBSD build job to sg-run-job.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Changes since v3:
 - New in this version (split from existing patch).
---
 sg-run-job | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Ian Jackson July 6, 2017, 3:38 p.m. UTC | #1
Roger Pau Monne writes ("[PATCH v4 14/16] osstest: add support for FreeBSD buildjobs to sg-run-job"):
> Add support and introduce a FreeBSD build job to sg-run-job.
...
>  proc allocate-build-host {ostype} {
>      global jobinfo
> +    if {[string equal $ostype FREEBSD]} {
> +        run-ts broken = ts-freebsd-set-hostflags
> +    }

I would prefer use of `switch' for this.  switch -exact $ostype etc.
Stylistically, please provide an explicit and empty default clause.

Ian.
diff mbox

Patch

diff --git a/sg-run-job b/sg-run-job
index 2ee57ace..ae08183d 100755
--- a/sg-run-job
+++ b/sg-run-job
@@ -681,6 +681,7 @@  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 }
+proc need-hosts/build-freebsd {} { return BUILD_FREEBSD }
 
 proc run-job/build {} {
     run-ts . = ts-xen-build
@@ -707,8 +708,15 @@  proc run-job/build-xtf {} {
     run-ts . = ts-xtf-build
 }
 
+proc run-job/build-freebsd {} {
+    run-ts . = ts-freebsd-build
+}
+
 proc allocate-build-host {ostype} {
     global jobinfo
+    if {[string equal $ostype FREEBSD]} {
+        run-ts broken = ts-freebsd-set-hostflags
+    }
     run-ts broken = ts-hosts-allocate + host
 }
 proc prepare-build-host-linux {} {
@@ -717,6 +725,11 @@  proc prepare-build-host-linux {} {
     run-ts . host-build-prep ts-xen-build-prep
 }
 
+proc prepare-build-host-freebsd {} {
+    global jobinfo
+    run-ts broken host-install(*) ts-freebsd-host-install
+}
+
 proc need-hosts/coverity {} { return BUILD }
 proc run-job/coverity {} {
     run-ts . = ts-coverity-build + host