aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/tests/fetch.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-17 11:38:57 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-17 11:38:59 +0300
commita3637155e829e06bbfe50fb8753de3de7ee8c22e (patch)
tree696d978455f04f56d3e7577971ee48b817581681 /lib/bb/tests/fetch.py
parent782bc0e797802224f06cb6f9098a50d658c86523 (diff)
downloadbitbake-contrib-a3637155e829e06bbfe50fb8753de3de7ee8c22e.tar.gz
tests/fetch: Allow to work on python 2.6
Currently the fetch tests fail on python 2.6 since check_output doesn't exist on this version of python. Use bb.process instead to avoid this problem. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/tests/fetch.py')
-rw-r--r--lib/bb/tests/fetch.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bb/tests/fetch.py b/lib/bb/tests/fetch.py
index 46db7e5c6..8bf095cee 100644
--- a/lib/bb/tests/fetch.py
+++ b/lib/bb/tests/fetch.py
@@ -341,7 +341,7 @@ class FetcherTest(unittest.TestCase):
def gitfetcher(self, url1, url2):
def checkrevision(self, fetcher):
fetcher.unpack(self.unpackdir)
- revision = subprocess.check_output("git rev-parse HEAD", shell=True, cwd=self.unpackdir + "/git").strip()
+ revision = bb.process.run("git rev-parse HEAD", shell=True, cwd=self.unpackdir + "/git")[0].strip()
self.assertEqual(revision, "270a05b0b4ba0959fe0624d2a4885d7b70426da5")
self.d.setVar("BB_GENERATE_MIRROR_TARBALLS", "1")
@@ -385,7 +385,7 @@ class FetcherTest(unittest.TestCase):
dummyurl = "git://someserver.org/bitbake"
self.sourcedir = self.unpackdir.replace("unpacked", "sourcemirror.git")
os.chdir(self.tempdir)
- subprocess.check_output("git clone %s %s 2> /dev/null" % (realurl, self.sourcedir), shell=True)
+ bb.process.run("git clone %s %s 2> /dev/null" % (realurl, self.sourcedir), shell=True)
self.d.setVar("PREMIRRORS", "%s git://%s;protocol=file \n" % (dummyurl, self.sourcedir))
self.gitfetcher(dummyurl, dummyurl)