Add implementation for the Planner global support. Also add unit tests
for the execution engine.

Caveat: the global support is still single-threaded with the execution
engine. I have an idea of how to make it multi-threaded, but I'd like to
push this simpler prototype out first.

Signed-off-by: James Ren <jamesren@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4388 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/frontend/planner/rpc_interface_unittest.py b/frontend/planner/rpc_interface_unittest.py
index 56c8e0a..d830db0 100644
--- a/frontend/planner/rpc_interface_unittest.py
+++ b/frontend/planner/rpc_interface_unittest.py
@@ -10,6 +10,12 @@
 from autotest_lib.frontend.tko import models as tko_models
 
 
+class DummyTestConfig(object):
+    def __init__(self):
+        self.id = object()
+        self.alias = object()
+
+
 class RpcInterfaceTest(unittest.TestCase,
                        planner_test_utils.PlannerTestMixin):
     def setUp(self):
@@ -74,8 +80,8 @@
 
 
     def test_get_next_test_configs(self):
-        DUMMY_CONFIGS = {'host1': object(),
-                         'host2': object()}
+        DUMMY_CONFIGS = {'host1': DummyTestConfig(),
+                         'host2': DummyTestConfig()}
         DUMMY_COMPLETE = object()
         self.god.stub_function(rpc_utils, 'compute_next_test_config')
 
@@ -95,7 +101,9 @@
         for config in result['next_configs']:
             self.assertTrue(config['host'] in DUMMY_CONFIGS)
             self.assertEqual(config['next_test_config_id'],
-                             DUMMY_CONFIGS[config['host']])
+                             DUMMY_CONFIGS[config['host']].id)
+            self.assertEqual(config['next_test_config_alias'],
+                             DUMMY_CONFIGS[config['host']].alias)
 
 
     def test_update_test_runs(self):