From a7b6b1f8cc1c096724f794ac9dee312b0f771f66 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Mon, 21 Mar 2016 18:14:05 +1300 Subject: 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 " resulted in the repo being created but "devtool add " didn't, which was wrong. Also update the oe-selftest tests to check that this worked. Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- meta/lib/oeqa/selftest/devtool.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'meta/lib/oeqa') 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): result = runCmd('devtool add %s %s -f %s' % (testrecipe, srcdir, url)) self.assertTrue(os.path.exists(os.path.join(self.workspacedir, 'conf', 'layer.conf')), 'Workspace directory not created. %s' % result.output) self.assertTrue(os.path.isfile(os.path.join(srcdir, 'setup.py')), 'Unable to find setup.py in source directory') + self.assertTrue(os.path.isdir(os.path.join(srcdir, '.git')), 'git repository for external source tree was not created') # Test devtool status result = runCmd('devtool status') self.assertIn(testrecipe, result.output) @@ -394,6 +395,7 @@ class DevtoolTests(DevtoolBase): result = runCmd('devtool add %s' % url) self.assertTrue(os.path.exists(os.path.join(self.workspacedir, 'conf', 'layer.conf')), 'Workspace directory not created. %s' % result.output) self.assertTrue(os.path.isfile(os.path.join(srcdir, 'configure')), 'Unable to find configure script in source directory') + self.assertTrue(os.path.isdir(os.path.join(srcdir, '.git')), 'git repository for external source tree was not created') # Test devtool status result = runCmd('devtool status') self.assertIn(testrecipe, result.output) -- cgit 1.2.3-korg