From 90cba7992bc1d227e242666cd486414bd4a45f7e Mon Sep 17 00:00:00 2001
From: Paul Eggleton <paul.eggleton@linux.intel.com>
Date: Sun, 11 Oct 2015 16:13:18 +0100
Subject: devtool: disable creating workspace for extract and search
 subcommands

For subcommands that don't actually involve the workspace, don't
auto-create the workspace.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/lib/oeqa/selftest/devtool.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'meta/lib')

diff --git a/meta/lib/oeqa/selftest/devtool.py b/meta/lib/oeqa/selftest/devtool.py
index dcdef5a14b..0a44ae71c8 100644
--- a/meta/lib/oeqa/selftest/devtool.py
+++ b/meta/lib/oeqa/selftest/devtool.py
@@ -823,10 +823,10 @@ class DevtoolTests(DevtoolBase):
         tempdir = tempfile.mkdtemp(prefix='devtoolqa')
         # Try devtool extract
         self.track_for_cleanup(tempdir)
-        self.track_for_cleanup(self.workspacedir)
-        self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
         result = runCmd('devtool extract remake %s' % tempdir)
         self.assertTrue(os.path.exists(os.path.join(tempdir, 'Makefile.am')), 'Extracted source could not be found')
+        # devtool extract shouldn't create the workspace
+        self.assertFalse(os.path.exists(self.workspacedir))
         self._check_src_repo(tempdir)
 
     @testcase(1379)
@@ -834,10 +834,10 @@ class DevtoolTests(DevtoolBase):
         tempdir = tempfile.mkdtemp(prefix='devtoolqa')
         # Try devtool extract
         self.track_for_cleanup(tempdir)
-        self.track_for_cleanup(self.workspacedir)
-        self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
         result = runCmd('devtool extract virtual/libx11 %s' % tempdir)
         self.assertTrue(os.path.exists(os.path.join(tempdir, 'Makefile.am')), 'Extracted source could not be found')
+        # devtool extract shouldn't create the workspace
+        self.assertFalse(os.path.exists(self.workspacedir))
         self._check_src_repo(tempdir)
 
     @testcase(1168)
-- 
cgit v1.2.3