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

Unified Diff: testing/legion/test_controller.py

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « testing/legion/task_registration_server.py ('k') | third_party/boringssl/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/legion/test_controller.py
diff --git a/testing/legion/test_controller.py b/testing/legion/test_controller.py
deleted file mode 100644
index 2703fadf09398794c1b72821610f3d4ffaf22b80..0000000000000000000000000000000000000000
--- a/testing/legion/test_controller.py
+++ /dev/null
@@ -1,69 +0,0 @@
-# Copyright 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Defines the test controller base library.
-
-This module is the basis on which test controllers are built and executed.
-"""
-
-import logging
-import sys
-
-#pylint: disable=relative-import
-import common_lib
-import task_controller
-import task_registration_server
-
-
-class TestController(object):
- """The base test controller class."""
-
- def __init__(self):
- self._registration_server = (
- task_registration_server.TaskRegistrationServer())
-
- def SetUp(self):
- """Setup method used by the subclass."""
- pass
-
- def RunTest(self):
- """Main test method used by the subclass."""
- raise NotImplementedError()
-
- def TearDown(self):
- """Teardown method used by the subclass."""
- pass
-
- def CreateNewTask(self, *args, **kwargs):
- task = task_controller.TaskController(*args, **kwargs)
- self._registration_server.RegisterTaskCallback(
- task.otp, task.OnConnect)
- return task
-
- def RunController(self):
- """Main entry point for the controller."""
- print ' '.join(sys.argv)
- common_lib.InitLogging()
- self._registration_server.Start()
-
- error = None
- tb = None
- try:
- self.SetUp()
- self.RunTest()
- except Exception as e:
- # Defer raising exceptions until after TearDown is called.
- error = e
- tb = sys.exc_info()[-1]
- try:
- self.TearDown()
- except Exception as e:
- if not tb:
- error = e
- tb = sys.exc_info()[-1]
-
- self._registration_server.Shutdown()
- task_controller.TaskController.ReleaseAllTasks()
- if error:
- raise error, None, tb #pylint: disable=raising-bad-type
« no previous file with comments | « testing/legion/task_registration_server.py ('k') | third_party/boringssl/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698