Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(644)

Unified Diff: scripts/slave/recipe_modules/swarming/tests/collect_gtest_task_test.py

Issue 2375663003: Add json test results format support for SwarmingIsolatedScriptTest (Closed)
Patch Set: Fix typos Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: scripts/slave/recipe_modules/swarming/tests/collect_gtest_task_test.py
diff --git a/scripts/slave/recipe_modules/swarming/tests/collect_gtest_task_test.py b/scripts/slave/recipe_modules/swarming/tests/collect_gtest_task_test.py
index 4df50baf01e6c62b066d0ce921c495c6c8e436d3..c47bb9e6647d2edaa6817e1753e2f6212ff49665 100755
--- a/scripts/slave/recipe_modules/swarming/tests/collect_gtest_task_test.py
+++ b/scripts/slave/recipe_modules/swarming/tests/collect_gtest_task_test.py
@@ -341,6 +341,25 @@ class MergeShardResultsTest(auto_stub.TestCase):
self.assertEqual(GOOD_GTEST_JSON_MERGED, merged)
self.assertEqual('', stdout)
+ def test_merged_json_result_ok(self):
+ self.stage({
+ 'summary.json': {'shards': [{'dummy': 0}, {'dummy': 0}, {'dummy': 0}]},
+ '0/output.json': GOOD_JSON_TEST_RESULT_0,
+ '1/output.json': GOOD_JSON_TEST_RESULT_1,
+ '2/output.json': GOOD_JSON_TEST_RESULT_2,
+ })
+ merged, stdout = self.call()
+ merged['swarming_summary'] = {
+ 'shards': [{
+ 'outputs_ref': {
+ 'view_url': 'blah',
+ },
+ }],
+ }
+ self.assertEqual(GOOD_JSON_TEST_RESULT_MERGED, merged)
Ken Russell (switch to Gerrit) 2016/10/04 01:43:43 This test doesn't pass, does it? I see Vadim's poi
nednguyen 2016/10/04 01:49:52 Ah, this change should be undo. My bad
+ self.assertEqual('', stdout)
+
+
def test_missing_summary_json(self):
# summary.json is missing, should return None and emit warning.
merged, output = self.call()

Powered by Google App Engine
This is Rietveld 408576698