Diff
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/checkout.js (116987 => 116988)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/checkout.js 2012-05-14 20:09:41 UTC (rev 116987)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/checkout.js 2012-05-14 20:11:23 UTC (rev 116988)
@@ -75,11 +75,12 @@
}, checkoutUnavailable);
};
-checkout.optimizeBaselines = function(testName, callback, checkoutUnavailable)
+checkout.optimizeBaselines = function(testName, suffixes, callback, checkoutUnavailable)
{
callIfCheckoutAvailable(function() {
net.post(config.kLocalServerURL + '/optimizebaselines?' + $.param({
'test': testName,
+ 'suffixes': suffixes,
}), function() {
callback();
});
@@ -102,9 +103,12 @@
{
callIfCheckoutAvailable(function() {
base.callInSequence(function(failureInfo, callback) {
+ var suffixes = base.uniquifyArray(base.flattenArray(failureInfo.failureInfoList.map(results.failureTypeToExtensionList))).join(',');
+
net.post(config.kLocalServerURL + '/rebaseline?' + $.param({
'builder': failureInfo.builderName,
'test': failureInfo.testName,
+ 'suffixes': suffixes,
}), function() {
if (progressCallback)
progressCallback(failureInfo);
@@ -112,7 +116,11 @@
});
}, failureInfoList, function() {
var testNameList = base.uniquifyArray(failureInfoList.map(function(failureInfo) { return failureInfo.testName; }));
- base.callInSequence(checkout.optimizeBaselines, testNameList, callback);
+ var suffixes = base.uniquifyArray(base.flattenArray(
+ failureInfoList.map(function(failureInfo) {
+ return base.flattenArray(failureInfo.failureInfoList.map(results.failureTypeToExtensionList))
+ }))).join(',');
+ base.callInSequence(function(testName, callback) { checkout.optimizeBaselines(testName, suffixes, callback)}, testNameList, callback);
});
}, checkoutUnavailable);
};
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/checkout_unittests.js (116987 => 116988)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/checkout_unittests.js 2012-05-14 20:09:41 UTC (rev 116987)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/checkout_unittests.js 2012-05-14 20:11:23 UTC (rev 116988)
@@ -60,12 +60,12 @@
var simulator = new NetworkSimulator();
simulator.post = function(url, callback)
{
- equals(url, 'http://127.0.0.1:8127/optimizebaselines?test=another%2Ftest.svg');
+ equals(url, 'http://127.0.0.1:8127/optimizebaselines?test=another%2Ftest.svg&suffixes=txt%2Cpng');
simulator.scheduleCallback(callback);
};
simulator.runTest(function() {
- checkout.optimizeBaselines('another/test.svg', function() {
+ checkout.optimizeBaselines('another/test.svg', 'txt,png', function() {
ok(true);
});
});
@@ -97,12 +97,15 @@
checkout.rebaseline([{
'builderName': 'WebKit Linux',
'testName': 'another/test.svg',
+ 'failureInfoList': ['IMAGE'],
}, {
'builderName': 'WebKit Mac10.6',
'testName': 'another/test.svg',
+ 'failureInfoList': ['IMAGE', 'TEXT', 'IMAGE+TEXT'],
}, {
'builderName': 'Webkit Vista',
'testName': 'fast/test.html',
+ 'failureInfoList': ['IMAGE+TEXT'],
}], function() {
ok(true);
}, function(failureInfo) {
@@ -113,11 +116,11 @@
});
deepEqual(requestedURLs, [
- "http://127.0.0.1:8127/rebaseline?builder=WebKit+Linux&test=another%2Ftest.svg",
- "http://127.0.0.1:8127/rebaseline?builder=WebKit+Mac10.6&test=another%2Ftest.svg",
- "http://127.0.0.1:8127/rebaseline?builder=Webkit+Vista&test=fast%2Ftest.html",
- "http://127.0.0.1:8127/optimizebaselines?test=another%2Ftest.svg",
- "http://127.0.0.1:8127/optimizebaselines?test=fast%2Ftest.html"
+ "http://127.0.0.1:8127/rebaseline?builder=WebKit+Linux&test=another%2Ftest.svg&suffixes=png",
+ "http://127.0.0.1:8127/rebaseline?builder=WebKit+Mac10.6&test=another%2Ftest.svg&suffixes=png%2Ctxt",
+ "http://127.0.0.1:8127/rebaseline?builder=Webkit+Vista&test=fast%2Ftest.html&suffixes=txt%2Cpng",
+ "http://127.0.0.1:8127/optimizebaselines?test=another%2Ftest.svg&suffixes=png%2Ctxt",
+ "http://127.0.0.1:8127/optimizebaselines?test=fast%2Ftest.html&suffixes=png%2Ctxt"
]);
});
Modified: trunk/Tools/ChangeLog (116987 => 116988)
--- trunk/Tools/ChangeLog 2012-05-14 20:09:41 UTC (rev 116987)
+++ trunk/Tools/ChangeLog 2012-05-14 20:11:23 UTC (rev 116988)
@@ -1,3 +1,40 @@
+2012-05-14 Dirk Pranke <[email protected]>
+
+ garden-o-matic should specify which types of baselines to rebaseline
+ https://bugs.webkit.org/show_bug.cgi?id=86242
+
+ Reviewed by Adam Barth.
+
+ This change modifies garden-o-matic so that we are explicit
+ about whether to rebaseline the text file, the image file, or
+ both. This should prevent us from pulling incorrect or
+ unexpected baselines off the bots.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/checkout.js:
+ (.):
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/checkout_unittests.js:
+ (.):
+ * Scripts/webkitpy/tool/commands/rebaseline.py:
+ (AbstractRebaseliningCommand):
+ (AbstractRebaseliningCommand.__init__):
+ (RebaselineTest):
+ (RebaselineTest._rebaseline_test_and_update_expectations):
+ (RebaselineTest.execute):
+ (OptimizeBaselines):
+ (OptimizeBaselines._optimize_baseline):
+ (OptimizeBaselines.execute):
+ (AnalyzeBaselines):
+ (AnalyzeBaselines._analyze_baseline):
+ (AnalyzeBaselines.execute):
+ (RebaselineExpectations._rebaseline_port):
+ * Scripts/webkitpy/tool/servers/gardeningserver.py:
+ (GardeningHTTPRequestHandler.rebaseline):
+ (GardeningHTTPRequestHandler.optimizebaselines):
+ * Scripts/webkitpy/tool/servers/gardeningserver_unittest.py:
+ (GardeningServerTest.test_rebaseline):
+ (GardeningServerTest.test_rebaseline_new_port):
+ (GardeningServerTest.test_optimizebaselines):
+
2012-05-14 Kangil Han <[email protected]>
[EFL][DRT] Fix WebCore library path
Modified: trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py (116987 => 116988)
--- trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py 2012-05-14 20:09:41 UTC (rev 116987)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py 2012-05-14 20:11:23 UTC (rev 116988)
@@ -47,6 +47,7 @@
from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand
+# FIXME: Pull this from Port.baseline_extensions().
_baseline_suffix_list = ['png', 'wav', 'txt']
@@ -55,7 +56,16 @@
return fs.splitext(test_name)[0] + TestResultWriter.FILENAME_SUFFIX_EXPECTED + "." + suffix
-class RebaselineTest(AbstractDeclarativeCommand):
+class AbstractRebaseliningCommand(AbstractDeclarativeCommand):
+ def __init__(self):
+ options = [
+ optparse.make_option('--suffixes', default=','.join(_baseline_suffix_list), action='',
+ help='file types to rebaseline')]
+ AbstractDeclarativeCommand.__init__(self, options=options)
+ self._baseline_suffix_list = _baseline_suffix_list
+
+
+class RebaselineTest(AbstractRebaseliningCommand):
name = "rebaseline-test"
help_text = "Rebaseline a single test from a buildbot. (Currently works only with build.chromium.org buildbots.)"
argument_names = "BUILDER_NAME TEST_NAME [PLATFORMS_TO_MOVE_EXISTING_BASELINES_TO]"
@@ -143,11 +153,13 @@
self._save_baseline(self._tool.web.get_binary(source_baseline, convert_404_to_None=True), target_baseline)
def _rebaseline_test_and_update_expectations(self, builder_name, test_name, platforms_to_move_existing_baselines_to):
- for suffix in _baseline_suffix_list:
+ for suffix in self._baseline_suffix_list:
self._rebaseline_test(builder_name, test_name, platforms_to_move_existing_baselines_to, suffix)
self._update_expectations_file(builder_name, test_name)
def execute(self, options, args, tool):
+ self._baseline_suffix_list = options.suffixes.split(',')
+
if len(args) > 2:
platforms_to_move_existing_baselines_to = args[2:]
else:
@@ -155,18 +167,19 @@
self._rebaseline_test_and_update_expectations(args[0], args[1], platforms_to_move_existing_baselines_to)
-class OptimizeBaselines(AbstractDeclarativeCommand):
+class OptimizeBaselines(AbstractRebaseliningCommand):
name = "optimize-baselines"
help_text = "Reshuffles the baselines for the given tests to use as litte space on disk as possible."
argument_names = "TEST_NAMES"
def _optimize_baseline(self, test_name):
- for suffix in _baseline_suffix_list:
+ for suffix in self._baseline_suffix_list:
baseline_name = _baseline_name(self._tool.filesystem, test_name, suffix)
if not self._baseline_optimizer.optimize(baseline_name):
print "Hueristics failed to optimize %s" % baseline_name
def execute(self, options, args, tool):
+ self._baseline_suffix_list = options.suffixes.split(',')
self._baseline_optimizer = BaselineOptimizer(tool)
self._port = tool.port_factory.get("chromium-win-win7") # FIXME: This should be selectable.
@@ -175,7 +188,7 @@
self._optimize_baseline(test_name)
-class AnalyzeBaselines(AbstractDeclarativeCommand):
+class AnalyzeBaselines(AbstractRebaseliningCommand):
name = "analyze-baselines"
help_text = "Analyzes the baselines for the given tests and prints results that are identical."
argument_names = "TEST_NAMES"
@@ -188,12 +201,13 @@
print ' '.join(results_names)
def _analyze_baseline(self, test_name):
- for suffix in _baseline_suffix_list:
+ for suffix in self._baseline_suffix_list:
baseline_name = _baseline_name(self._tool.filesystem, test_name, suffix)
directories_by_result = self._baseline_optimizer.directories_by_result(baseline_name)
self._print(baseline_name, directories_by_result)
def execute(self, options, args, tool):
+ self._baseline_suffix_list = options.suffixes.split(',')
self._baseline_optimizer = BaselineOptimizer(tool)
self._port = tool.port_factory.get("chromium-win-win7") # FIXME: This should be selectable.
@@ -248,6 +262,7 @@
for test_name in self._tests_to_rebaseline(self._tool.port_factory.get(port_name)):
self._touched_test_names.add(test_name)
print " %s" % test_name
+ # FIXME: need to extract the correct list of suffixes here.
self._run_webkit_patch(['rebaseline-test', builder_name, test_name])
def execute(self, options, args, tool):
Modified: trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver.py (116987 => 116988)
--- trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver.py 2012-05-14 20:09:41 UTC (rev 116987)
+++ trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver.py 2012-05-14 20:11:23 UTC (rev 116988)
@@ -139,8 +139,10 @@
builder = self.query['builder'][0]
command = [
'rebaseline-test',
+ '--suffixes', self.query['suffixes'][0],
builder,
self.query['test'][0],
+
]
command.extend(builders.fallback_port_names_for_new_port(builder))
self._run_webkit_patch(command)
@@ -150,6 +152,7 @@
test = self.query['test'][0]
self._run_webkit_patch([
'optimize-baselines',
+ '--suffixes', self.query['suffixes'][0],
test,
])
self._serve_text('success')
Modified: trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver_unittest.py (116987 => 116988)
--- trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver_unittest.py 2012-05-14 20:09:41 UTC (rev 116987)
+++ trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver_unittest.py 2012-05-14 20:11:23 UTC (rev 116988)
@@ -183,20 +183,20 @@
def test_rebaseline(self):
builders._exact_matches = {"MOCK builder": {"port_name": "mock-port-name", "specifiers": set(["mock-specifier"])}}
- expected_stderr = "MOCK run_command: ['echo', 'rebaseline-test', 'MOCK builder', 'user-scripts/another-test.html'], cwd=/mock-checkout\n"
+ expected_stderr = "MOCK run_command: ['echo', 'rebaseline-test', '--suffixes', 'txt,png', 'MOCK builder', 'user-scripts/another-test.html'], cwd=/mock-checkout\n"
expected_stdout = "== Begin Response ==\nsuccess\n== End Response ==\n"
- self._post_to_path("/rebaseline?builder=MOCK+builder&test=user-scripts/another-test.html", expected_stderr=expected_stderr, expected_stdout=expected_stdout)
+ self._post_to_path("/rebaseline?builder=MOCK+builder&test=user-scripts/another-test.html&suffixes=txt,png", expected_stderr=expected_stderr, expected_stdout=expected_stdout)
def test_rebaseline_new_port(self):
builders._exact_matches = {"MOCK builder": {"port_name": "mock-port-name", "specifiers": set(["mock-specifier"]), "move_overwritten_baselines_to": ["mock-port-fallback", "mock-port-fallback2"]}}
- expected_stderr = "MOCK run_command: ['echo', 'rebaseline-test', 'MOCK builder', 'user-scripts/another-test.html', 'mock-port-fallback', 'mock-port-fallback2'], cwd=/mock-checkout\n"
+ expected_stderr = "MOCK run_command: ['echo', 'rebaseline-test', '--suffixes', 'txt,png', 'MOCK builder', 'user-scripts/another-test.html', 'mock-port-fallback', 'mock-port-fallback2'], cwd=/mock-checkout\n"
expected_stdout = "== Begin Response ==\nsuccess\n== End Response ==\n"
- self._post_to_path("/rebaseline?builder=MOCK+builder&test=user-scripts/another-test.html", expected_stderr=expected_stderr, expected_stdout=expected_stdout)
+ self._post_to_path("/rebaseline?builder=MOCK+builder&test=user-scripts/another-test.html&suffixes=txt,png", expected_stderr=expected_stderr, expected_stdout=expected_stdout)
def test_optimizebaselines(self):
- expected_stderr = "MOCK run_command: ['echo', 'optimize-baselines', 'user-scripts/another-test.html'], cwd=/mock-checkout\n"
+ expected_stderr = "MOCK run_command: ['echo', 'optimize-baselines', '--suffixes', 'txt,png', 'user-scripts/another-test.html'], cwd=/mock-checkout\n"
expected_stdout = "== Begin Response ==\nsuccess\n== End Response ==\n"
- self._post_to_path("/optimizebaselines?test=user-scripts/another-test.html", expected_stderr=expected_stderr, expected_stdout=expected_stdout)
+ self._post_to_path("/optimizebaselines?test=user-scripts/another-test.html&suffixes=txt,png", expected_stderr=expected_stderr, expected_stdout=expected_stdout)
def test_updateexpectations(self):
expected_stderr = ""