]> code.ossystems Code Review - openembedded-core.git/commitdiff
oe-selftest: devtool: remove use of git -C
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Fri, 20 Jan 2017 01:49:02 +0000 (14:49 +1300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 20 Jan 2017 09:33:49 +0000 (09:33 +0000)
The -C option isn't available in versions of git older than 1.8.5,
and officially we only require git 1.8.3.1 or newer (and the latter is
the version you'll find on CentOS 7, so the test fails there). In any
case we can simply specify the working directory to runCmd() so just
do that instead.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/devtool.py

index 887c1e6b4cef5fb7b171bda38eae37e3d715279c..dc3435fc2b9987d452747714cae40a9913c22a7d 100644 (file)
@@ -461,7 +461,7 @@ class DevtoolTests(DevtoolBase):
         bitbake('mdadm -c package')
         check_line(manfile, 'antique pin sardine', 'man file not modified. man searched file path: %s' % manfile)
 
-        result = runCmd('git -C %s checkout -- %s' % (tempdir, modfile))
+        result = runCmd('git checkout -- %s' % modfile, cwd=tempdir)
         check_line(modfile, 'Linux Software RAID', 'man .in file not restored (git failed)')
 
         bitbake('mdadm -c package')