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

Side by Side Diff: build/android/pylib/base/test_run.py

Issue 2933993002: Add local results details pages.
Patch Set: Add --local-output arg which enables local results detail pages. Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 5
6 class TestRun(object): 6 class TestRun(object):
7 """An execution of a particular test on a particular device. 7 """An execution of a particular test on a particular device.
8 8
9 This is expected to handle all logic that is specific to the combination of 9 This is expected to handle all logic that is specific to the combination of
10 environment and test type. 10 environment and test type.
11 11
12 Examples include: 12 Examples include:
13 - local gtests 13 - local gtests
14 - local instrumentation tests 14 - local instrumentation tests
15 """ 15 """
16 16
17 def __init__(self, env, test_instance): 17 def __init__(self, env, test_instance, test_output_saver):
18 self._env = env 18 self._env = env
19 self._test_instance = test_instance 19 self._test_instance = test_instance
20 self._test_output_saver = test_output_saver
jbudorick 2017/06/20 14:12:54 Can you explain why this is in the test run rather
mikecase (-- gone --) 2017/07/10 17:11:10 Well, I think test_runs are really the things savi
20 21
21 def TestPackage(self): 22 def TestPackage(self):
22 raise NotImplementedError 23 raise NotImplementedError
23 24
24 def SetUp(self): 25 def SetUp(self):
25 raise NotImplementedError 26 raise NotImplementedError
26 27
27 def RunTests(self): 28 def RunTests(self):
28 """Runs Tests and returns test results. 29 """Runs Tests and returns test results.
29 30
30 Returns: 31 Returns:
31 Should return list of |base_test_result.TestRunResults| objects. 32 Should return list of |base_test_result.TestRunResults| objects.
32 """ 33 """
33 raise NotImplementedError 34 raise NotImplementedError
34 35
35 def TearDown(self): 36 def TearDown(self):
36 raise NotImplementedError 37 raise NotImplementedError
37 38
38 def __enter__(self): 39 def __enter__(self):
39 self.SetUp() 40 self.SetUp()
40 return self 41 return self
41 42
42 def __exit__(self, exc_type, exc_val, exc_tb): 43 def __exit__(self, exc_type, exc_val, exc_tb):
43 self.TearDown() 44 self.TearDown()
44 45
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698