51 # FIXME: Remove this step once Chromium WebKit port build system is decoupled from
52 # Chromium (https://bugs.webkit.org/show_bug.cgi?id=28396)
53 class UpdateChromiumSource(shell.ShellCommand):
54 command = ["gclient", "sync"]
55 name = "update-chromium"
56 description = ["updating chromium source"]
57 descriptionDone = ["updated"]
58 haltOnFailure = True
59
60 def createSummary(self, log):
61 scraper = re.compile(r"^________ running '[^\n]+third_party[/\\]WebKit[^\n]+$\n(?:^[UA]\W+[^\n]+$\n)*^(?:Updated to|At) revision (\d+)", re.DOTALL | re.MULTILINE)
62 revisions = scraper.findall(log.getText())
63 gotRevision = "??" # This matches SVN unknown revision response.
64 if len(revisions):
65 gotRevision = "r%s" % revisions[-1]
66 self.descriptionDone = ["updated", gotRevision]
67
68 def start(self):
69 os = self.getProperty("fullPlatform").split('-')[1]
70 if os == "win":
71 self.setCommand(["gclient.bat", "sync"])
72 revision = self.getProperty("revision")
73 if revision:
74 command = self.command[:]
75 command.append("--revision=src/third_party/WebKit@%d" % revision)
76 self.setCommand(command)
77 return shell.ShellCommand.start(self)
78
79
80 # FIXME: Remove this step once Chromium WebKit port build system is decoupled from
81 # Chromium (https://bugs.webkit.org/show_bug.cgi?id=28396)
82 class CompileChromiumWebKit(shell.ShellCommand):
83 command = ["python", "../../../scripts/slave/compile.py"]
84 name = "build-chromium"
85 description = ["compiling"]
86 descriptionDone = ["compiled"]
87 haltOnFailure = True
88
89 def start(self):
90 os = self.getProperty("fullPlatform").split('-')[1]
91 command = self.command[:]
92 if os == "win":
93 command.extend(["--solution=webkit.sln", "--build-dir=src\\webkit", "--", "/project", "webcore"])
94 elif os == "mac":
95 command.extend(["--solution=__solution__", "--build-dir=src/build", "--", "-project", "../webkit/webkit.xcodeproj", "-target", "webcore"])
96 self.setCommand(command)
97 return shell.ShellCommand.start(self)
98
99