]> xenbits.xensource.com Git - people/gdunlap/xsatool.git/commitdiff
Fix systemtest after move to use staging for 'master' version
authorGeorge Dunlap <george.dunlap@citrix.com>
Mon, 30 Oct 2017 12:23:29 +0000 (12:23 +0000)
committerGeorge Dunlap <george.dunlap@citrix.com>
Mon, 30 Oct 2017 17:34:38 +0000 (17:34 +0000)
Commit 54c104c switched the default "reference" for XenVersionMaster
to 'staging', but didn't update systemtest with the new expectations.
Do so now by doing the following.

Have the "InitialTreeState" set up both `staging` and `master` to point to
the same place.

Teach Story206Init to expect 'master' to look like 'staging'.

While we're here, update some hard-coded XenVersion("master")
instances to be the constant XenVersionMaster instead.

Signed-off-by: George Dunlap <george.dunlap@citrix.com>
global.go
recipe.go
systemtest.go
xsa.go

index 4f21f6d1cadf9fbd8d4f0fb227f8016d57e85388..78d7f29e3a4c28914b996bc7ebc5c807ff83c619 100644 (file)
--- a/global.go
+++ b/global.go
@@ -39,7 +39,7 @@ func MainGlobalUpdate(unused *XSAMeta, args []string) int {
 
                sm.Versions = make(map[XenVersion]*VersionMeta)
 
-               sm.InitVersion(XenVersion("master"))
+               sm.InitVersion(XenVersionMaster)
 
                init = true
        }
index 1ba7873e0f48beecc2642bb4700153d693341b34..87e91981dba681890523ab8aa614b8a6c159a0de 100644 (file)
--- a/recipe.go
+++ b/recipe.go
@@ -195,7 +195,7 @@ func (r *Recipe) MakePatches(prefix string, sync bool) (count int, err error) {
                        xsabase += "-" + tree.String()
                }
 
-               if r.XenVersion != "master" {
+               if r.XenVersion != XenVersionMaster {
                        xsabase += "-" + r.XenVersion.String()
                }
 
index 86b563acfb6c6e8e9f8cd15bb607fae646de99e5..91edce32c86cac1115d2692e560ddb0ac0f9db05 100644 (file)
@@ -31,13 +31,14 @@ type InitialTreeState map[Tree]*map[string]string
 // Reset to a known state:
 // (Want to be able to apply XSA-206 (backports) , XSA-211 (qemu), XSA-212-15 (xen)
 // ~ March 27th
-// Xen master    : ac9ff74
-// qemu-upstream : acde9f3
-// qemu-trad     : 8b4834e
-// xsa           : bff3883
+// Xen master/staging : ac9ff74
+// qemu-upstream      : acde9f3
+// qemu-trad          : 8b4834e
+// xsa                : bff3883
 
 var its = InitialTreeState{
        "xen": &map[string]string{
+               "staging":    "ac9ff74",
                "master":     "ac9ff74",
                "stable-4.8": "e0354e6",
                "stable-4.7": "b5c7dea",
@@ -342,12 +343,12 @@ func Story206Init(st *SystemTest) (pass bool) {
                fv   XenVersionFull
                seen bool
        }{
-               "master": {fv: "master"},
-               "4.8":    {fv: "4.8.0"},
-               "4.7":    {fv: "4.7.2"},
-               "4.6":    {fv: "4.6.5"},
-               "4.5":    {fv: "4.5.5"},
-               "4.4":    {fv: "4.4.4"},
+               "master":  {fv: "staging"},
+               "4.8":     {fv: "4.8.0"},
+               "4.7":     {fv: "4.7.2"},
+               "4.6":     {fv: "4.6.5"},
+               "4.5":     {fv: "4.5.5"},
+               "4.4":     {fv: "4.4.4"},
        }
 
        for v := range xsa.Recipes {
diff --git a/xsa.go b/xsa.go
index 8280817fb66e65683a6a01623f914d0ea0eb0169..04ab88f3cc6b7d15afb896cc4b7b7ce638eb7c0e 100644 (file)
--- a/xsa.go
+++ b/xsa.go
@@ -163,7 +163,7 @@ func MainInit(xsa *XSAMeta, args []string) (ret int) {
        }
 
        // Check out "xsa/NNN/master" on all relevant trees
-       _, _, branch := BranchName("xsa", xsa.XSA, XenVersion("master"))
+       _, _, branch := BranchName("xsa", xsa.XSA, XenVersionMaster)
        for _, t := range xsa.Trees {
                _, err := G.repos.GetRepoNC(t).Checkout(branch)
                if err != nil {