~linaro-android-bot-maintainers/linaro-android-bot-review/releases

« back to all changes in this revision

Viewing changes to tests/testandroidbotreview.py

  • Committer: Paul Sokolovsky
  • Date: 2011-10-20 23:48:45 UTC
  • mfrom: (73.1.1 linaro-android-bot-review)
  • Revision ID: paul.sokolovsky@linaro.org-20111020234845-lvz7ini2em6pyb0b
[merge] Fix lp:870803 and lp:870801.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
 
46
46
 
47
47
    def testGet_extra_config(self):
48
 
        extra_config = self.i.get_extra_config({"project": "a",
 
48
        extra_config = self.i.get_extra_config({"project": "a1/a2",
49
49
            "currentPatchSet": {"ref": "b"}})
50
 
        self.assertEquals("CONFIGURATION='%s && %s && %s && %s'" % (
51
 
            "cd a",
52
 
            "git fetch http://%s/p/%s %s" % (self.i.gc.review_host, "a", "b"),
53
 
            "git checkout FETCH_HEAD",
54
 
            "cd -"), extra_config)
 
50
        self.assert_(0 < extra_config.find(
 
51
            "CONFIGURATION='%s && %s && %s && %s'" % (
 
52
                "cd $(repo list | sed '/a1\/a2/ ! d; s/^\(\w*\).*/\1/')",
 
53
                "git fetch http://%s/p/%s %s" % (
 
54
                    self.i.gc.review_host, "a1/a2", "b"),
 
55
                "git checkout FETCH_HEAD",
 
56
                "cd -")))
55
57
        extra_config = self.i.get_extra_config({"project": "platform/manifest",
56
58
            "currentPatchSet": {"ref": "b"}})
57
 
        self.assertEquals("CONFIGURATION='%s && %s && %s && %s && %s && %s && %s'" % (
58
 
            "cd .repo/manifests",
59
 
            "git reset --hard",
60
 
            "git fetch http://%s/p/%s %s" % (self.i.gc.review_host, 
61
 
                "platform/manifest", "b"),
62
 
            "git checkout -b build FETCH_HEAD",
63
 
            "cd -",
64
 
            "repo init -u .repo/manifests -b build",
65
 
            "repo sync -ld"), extra_config)
 
59
        self.assert_(0 < extra_config.find(
 
60
            "CONFIGURATION='%s && %s && %s && %s && %s && %s && %s'" % (
 
61
                "cd .repo/manifests",
 
62
                "git reset --hard",
 
63
                "git fetch http://%s/p/%s %s" % (self.i.gc.review_host, 
 
64
                    "platform/manifest", "b"),
 
65
                "git checkout -b build FETCH_HEAD",
 
66
                "cd -",
 
67
                "repo init -u .repo/manifests -b build",
 
68
                "repo sync -ld")))
66
69
 
67
70
 
68
71
    def xtestBuild_jobs(self):