Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 1 | import shutil |
| 2 | |
| 3 | from oeqa.oetest import oeSDKExtTest |
| 4 | from oeqa.utils.decorators import * |
| 5 | |
| 6 | class DevtoolTest(oeSDKExtTest): |
| 7 | |
| 8 | @classmethod |
| 9 | def setUpClass(self): |
| 10 | self.myapp_src = os.path.join(self.tc.sdkextfilesdir, "myapp") |
| 11 | self.myapp_dst = os.path.join(self.tc.sdktestdir, "myapp") |
| 12 | shutil.copytree(self.myapp_src, self.myapp_dst) |
| 13 | |
| 14 | def test_devtool_location(self): |
| 15 | output = self._run('which devtool') |
| 16 | self.assertEqual(output.startswith(self.tc.sdktestdir), True, \ |
| 17 | msg="Seems that devtool isn't the eSDK one: %s" % output) |
| 18 | |
| 19 | @skipUnlessPassed('test_devtool_location') |
| 20 | def test_devtool_add_reset(self): |
| 21 | self._run('devtool add myapp %s' % self.myapp_dst) |
| 22 | self._run('devtool reset myapp') |
| 23 | |
| 24 | @skipUnlessPassed('test_devtool_location') |
| 25 | def test_devtool_build(self): |
| 26 | self._run('devtool add myapp %s' % self.myapp_dst) |
| 27 | self._run('devtool build myapp') |
| 28 | self._run('devtool reset myapp') |
| 29 | |
| 30 | @classmethod |
| 31 | def tearDownClass(self): |
| 32 | shutil.rmtree(self.myapp_dst) |