diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2016-03-21 18:14:05 +1300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-25 10:29:13 +0000 |
commit | 0523378082e9a3857808bdb2a8a5df05aade8b20 (patch) | |
tree | d061c0376b57be52ac15dcde0c0f03ac26bfb617 /meta | |
parent | 11c1d30152ad2c6461d8c3638add4d97b90e8c46 (diff) | |
download | poky-0523378082e9a3857808bdb2a8a5df05aade8b20.tar.gz |
devtool: add: create git repository if URL specified as positional argument
When we add from a fetched URL we are supposed to turn the resulting
source tree into a git repository (if it isn't already one). However, we
were using the older deprecated option name here instead of the
positional argument, so "devtool add -f <url>" resulted in the repo
being created but "devtool add <url>" didn't, which was wrong.
Also update the oe-selftest tests to check that this worked.
(From OE-Core rev: a7b6b1f8cc1c096724f794ac9dee312b0f771f66)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oeqa/selftest/devtool.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/devtool.py b/meta/lib/oeqa/selftest/devtool.py index 2e4b6dada3..fe9f7f77a4 100644 --- a/meta/lib/oeqa/selftest/devtool.py +++ b/meta/lib/oeqa/selftest/devtool.py | |||
@@ -301,6 +301,7 @@ class DevtoolTests(DevtoolBase): | |||
301 | result = runCmd('devtool add %s %s -f %s' % (testrecipe, srcdir, url)) | 301 | result = runCmd('devtool add %s %s -f %s' % (testrecipe, srcdir, url)) |
302 | self.assertTrue(os.path.exists(os.path.join(self.workspacedir, 'conf', 'layer.conf')), 'Workspace directory not created. %s' % result.output) | 302 | self.assertTrue(os.path.exists(os.path.join(self.workspacedir, 'conf', 'layer.conf')), 'Workspace directory not created. %s' % result.output) |
303 | self.assertTrue(os.path.isfile(os.path.join(srcdir, 'setup.py')), 'Unable to find setup.py in source directory') | 303 | self.assertTrue(os.path.isfile(os.path.join(srcdir, 'setup.py')), 'Unable to find setup.py in source directory') |
304 | self.assertTrue(os.path.isdir(os.path.join(srcdir, '.git')), 'git repository for external source tree was not created') | ||
304 | # Test devtool status | 305 | # Test devtool status |
305 | result = runCmd('devtool status') | 306 | result = runCmd('devtool status') |
306 | self.assertIn(testrecipe, result.output) | 307 | self.assertIn(testrecipe, result.output) |
@@ -394,6 +395,7 @@ class DevtoolTests(DevtoolBase): | |||
394 | result = runCmd('devtool add %s' % url) | 395 | result = runCmd('devtool add %s' % url) |
395 | self.assertTrue(os.path.exists(os.path.join(self.workspacedir, 'conf', 'layer.conf')), 'Workspace directory not created. %s' % result.output) | 396 | self.assertTrue(os.path.exists(os.path.join(self.workspacedir, 'conf', 'layer.conf')), 'Workspace directory not created. %s' % result.output) |
396 | self.assertTrue(os.path.isfile(os.path.join(srcdir, 'configure')), 'Unable to find configure script in source directory') | 397 | self.assertTrue(os.path.isfile(os.path.join(srcdir, 'configure')), 'Unable to find configure script in source directory') |
398 | self.assertTrue(os.path.isdir(os.path.join(srcdir, '.git')), 'git repository for external source tree was not created') | ||
397 | # Test devtool status | 399 | # Test devtool status |
398 | result = runCmd('devtool status') | 400 | result = runCmd('devtool status') |
399 | self.assertIn(testrecipe, result.output) | 401 | self.assertIn(testrecipe, result.output) |