return
}
+func Story206Implement(t *testing.T) (pass bool) {
+ // [should already be on correct branch]
+
+ // git am $PATH/xsa206-master/*.patch
+
+ out, err := G.repos.XenRepos[TreeXen].Am("../testdata/xsa206-unstable/*.patch")
+ if err != nil {
+ t.Errorf("Error importing example patches: %v %s\n", err, string(out))
+ return
+ }
+
+ return true
+}
+
+func Story206SyncOne(t *testing.T) (pass bool) {
+ t.Logf(" xsatool 206 sync-patches")
+ if MainHarness("206", "sync-patches") != 0 {
+ t.Errorf("xsatool 206 sync-patches failed\n")
+ return false
+ }
+
+ var xsa XSAMeta
+
+ err := xsa.Load(206)
+ if err != nil {
+ t.Errorf("Error loading updated recipe: %v\n", err)
+ return false
+ }
+
+ pass = true
+
+ for v := range xsa.Recipes {
+ r := xsa.GetRecipe(v)
+ for tree := range r.Recipes {
+ tr := r.Recipes[tree]
+ expected := 0
+ if v == XenVersion("master") && tree == TreeXen {
+ expected = 1
+ }
+ if len(tr.Patches) != expected {
+ t.Errorf("Version %v tree %v: Wanted %d, got %d\n",
+ v, tree, expected, len(tr.Patches))
+ pass = false
+ }
+ }
+ }
+
+ return pass
+}
+
func Story206(t *testing.T) bool {
t.Logf("Starting XSA-206 'story'")
// xsatool 206 init xen
}
// Fake-up xsa/206/master
+ if !Story206Implement(t) {
+ return false
+ }
// 206 sync-patches
+ if !Story206SyncOne(t) {
+ return false
+ }
// 206 Backport (should fail at 4.8. 4.7, and 4.6; NOT 4.5)