]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/selftest/devtool: fix test if build directory is not inside COREBASE
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Wed, 4 Nov 2015 14:40:25 +0000 (14:40 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 16 Nov 2015 11:37:17 +0000 (11:37 +0000)
Fix test_devtool_update_recipe_git to work when build directory is not
inside COREBASE.

Fixes [YOCTO #8639].

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

index f48e6a2557e22299e852957cc3b7eea0d2d17c51..dcdef5a14be9d6753d117e16cfc72f31551ddcf4 100644 (file)
@@ -582,7 +582,7 @@ class DevtoolTests(DevtoolBase):
         # Now try with auto mode
         runCmd('cd %s; git checkout %s %s' % (os.path.dirname(recipefile), testrecipe, os.path.basename(recipefile)))
         result = runCmd('devtool update-recipe %s' % testrecipe)
-        result = runCmd('git rev-parse --show-toplevel')
+        result = runCmd('git rev-parse --show-toplevel', cwd=os.path.dirname(recipefile))
         topleveldir = result.output.strip()
         relpatchpath = os.path.join(os.path.relpath(os.path.dirname(recipefile), topleveldir), testrecipe)
         expected_status = [(' M', os.path.relpath(recipefile, topleveldir)),