summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-03-02 21:26:55 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-07 17:23:03 +0000
commit3db71b408719d8588191edfc3b82554f72283e59 (patch)
tree32e7d541bfd2888e85ec7d15eef9807740223712
parent790b2d1387a150b85612ad38a53bab788154e4bb (diff)
downloadpoky-3db71b408719d8588191edfc3b82554f72283e59.tar.gz
bitbake: toaster: don't use sshbecontroller
Removed usage of sshbecontroller from bbcontroller, models, tests and database schema. (Bitbake rev: 3ee06eb7e96de5dba539ad52201867e77d06a53e) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/toaster/bldcontrol/bbcontroller.py6
-rw-r--r--bitbake/lib/toaster/bldcontrol/migrations/0002_auto_20160120_1250.py19
-rw-r--r--bitbake/lib/toaster/bldcontrol/models.py2
-rw-r--r--bitbake/lib/toaster/bldcontrol/tests.py24
4 files changed, 19 insertions, 32 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/bbcontroller.py b/bitbake/lib/toaster/bldcontrol/bbcontroller.py
index f228d37459..f40103cb45 100644
--- a/bitbake/lib/toaster/bldcontrol/bbcontroller.py
+++ b/bitbake/lib/toaster/bldcontrol/bbcontroller.py
@@ -76,13 +76,10 @@ def getBuildEnvironmentController(**kwargs):
76 """ 76 """
77 77
78 from localhostbecontroller import LocalhostBEController 78 from localhostbecontroller import LocalhostBEController
79 from sshbecontroller import SSHBEController
80 79
81 be = BuildEnvironment.objects.filter(Q(**kwargs))[0] 80 be = BuildEnvironment.objects.filter(Q(**kwargs))[0]
82 if be.betype == BuildEnvironment.TYPE_LOCAL: 81 if be.betype == BuildEnvironment.TYPE_LOCAL:
83 return LocalhostBEController(be) 82 return LocalhostBEController(be)
84 elif be.betype == BuildEnvironment.TYPE_SSH:
85 return SSHBEController(be)
86 else: 83 else:
87 raise Exception("FIXME: Implement BEC for type %s" % str(be.betype)) 84 raise Exception("FIXME: Implement BEC for type %s" % str(be.betype))
88 85
@@ -105,9 +102,6 @@ class BuildEnvironmentController(object):
105 on the local machine, with the "build/" directory under the "poky/" source checkout directory. 102 on the local machine, with the "build/" directory under the "poky/" source checkout directory.
106 Bash is expected to be available. 103 Bash is expected to be available.
107 104
108 * SSH controller will run the Toaster BE on a remote machine, where the current user
109 can connect without raise Exception("FIXME: implement")word (set up with either ssh-agent or raise Exception("FIXME: implement")phrase-less key authentication)
110
111 """ 105 """
112 def __init__(self, be): 106 def __init__(self, be):
113 """ Takes a BuildEnvironment object as parameter that points to the settings of the BE. 107 """ Takes a BuildEnvironment object as parameter that points to the settings of the BE.
diff --git a/bitbake/lib/toaster/bldcontrol/migrations/0002_auto_20160120_1250.py b/bitbake/lib/toaster/bldcontrol/migrations/0002_auto_20160120_1250.py
new file mode 100644
index 0000000000..0c2475aba5
--- /dev/null
+++ b/bitbake/lib/toaster/bldcontrol/migrations/0002_auto_20160120_1250.py
@@ -0,0 +1,19 @@
1# -*- coding: utf-8 -*-
2from __future__ import unicode_literals
3
4from django.db import migrations, models
5
6
7class Migration(migrations.Migration):
8
9 dependencies = [
10 ('bldcontrol', '0001_initial'),
11 ]
12
13 operations = [
14 migrations.AlterField(
15 model_name='buildenvironment',
16 name='betype',
17 field=models.IntegerField(choices=[(0, b'local')]),
18 ),
19 ]
diff --git a/bitbake/lib/toaster/bldcontrol/models.py b/bitbake/lib/toaster/bldcontrol/models.py
index bb613c68a2..9244ed1d81 100644
--- a/bitbake/lib/toaster/bldcontrol/models.py
+++ b/bitbake/lib/toaster/bldcontrol/models.py
@@ -12,10 +12,8 @@ class BuildEnvironment(models.Model):
12 ) 12 )
13 13
14 TYPE_LOCAL = 0 14 TYPE_LOCAL = 0
15 TYPE_SSH = 1
16 TYPE = ( 15 TYPE = (
17 (TYPE_LOCAL, "local"), 16 (TYPE_LOCAL, "local"),
18 (TYPE_SSH, "ssh"),
19 ) 17 )
20 18
21 LOCK_FREE = 0 19 LOCK_FREE = 0
diff --git a/bitbake/lib/toaster/bldcontrol/tests.py b/bitbake/lib/toaster/bldcontrol/tests.py
index e8089914b7..f20cc7d4b1 100644
--- a/bitbake/lib/toaster/bldcontrol/tests.py
+++ b/bitbake/lib/toaster/bldcontrol/tests.py
@@ -9,7 +9,6 @@ from django.test import TestCase
9 9
10from bldcontrol.bbcontroller import BitbakeController, BuildSetupException 10from bldcontrol.bbcontroller import BitbakeController, BuildSetupException
11from bldcontrol.localhostbecontroller import LocalhostBEController 11from bldcontrol.localhostbecontroller import LocalhostBEController
12from bldcontrol.sshbecontroller import SSHBEController
13from bldcontrol.models import BuildEnvironment, BuildRequest 12from bldcontrol.models import BuildEnvironment, BuildRequest
14from bldcontrol.management.commands.runbuilds import Command 13from bldcontrol.management.commands.runbuilds import Command
15 14
@@ -110,29 +109,6 @@ class LocalhostBEControllerTests(TestCase, BEControllerTests):
110 def _getBEController(self, obe): 109 def _getBEController(self, obe):
111 return LocalhostBEController(obe) 110 return LocalhostBEController(obe)
112 111
113class SSHBEControllerTests(TestCase, BEControllerTests):
114 def __init__(self, *args):
115 super(SSHBEControllerTests, self).__init__(*args)
116
117 def _getBuildEnvironment(self):
118 return BuildEnvironment.objects.create(
119 lock = BuildEnvironment.LOCK_FREE,
120 betype = BuildEnvironment.TYPE_SSH,
121 address = test_address,
122 sourcedir = test_sourcedir,
123 builddir = test_builddir )
124
125 def _getBEController(self, obe):
126 return SSHBEController(obe)
127
128 def test_pathExists(self):
129 obe = BuildEnvironment.objects.create(betype = BuildEnvironment.TYPE_SSH, address= test_address)
130 sbc = SSHBEController(obe)
131 self.assertTrue(sbc._pathexists("/"))
132 self.assertFalse(sbc._pathexists("/.deadbeef"))
133 self.assertTrue(sbc._pathexists(sbc._shellcmd("pwd")))
134
135
136class RunBuildsCommandTests(TestCase): 112class RunBuildsCommandTests(TestCase):
137 def test_bec_select(self): 113 def test_bec_select(self):
138 """ 114 """