summaryrefslogtreecommitdiffstats
path: root/bitbake
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-06-03 16:58:14 +0100
commit6b9db4e482acee0757720330f4fb63263c5e249e (patch)
treef5d17ac66bfbafc0f854e407407ac7686bdaa342 /bitbake
parent96e832484b7676ce8ce45b9a170b479dc9aa5b6e (diff)
downloadpoky-6b9db4e482acee0757720330f4fb63263c5e249e.tar.gz
bitbake: 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. (Bitbake rev: 32f72dbeef34612a729b06c9ce9e94072479b6fb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/tests/fetch.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py
index 46db7e5c60..8bf095ceea 100644
--- a/bitbake/lib/bb/tests/fetch.py
+++ b/bitbake/lib/bb/tests/fetch.py
@@ -341,7 +341,7 @@ class FetcherTest(unittest.TestCase):
341 def gitfetcher(self, url1, url2): 341 def gitfetcher(self, url1, url2):
342 def checkrevision(self, fetcher): 342 def checkrevision(self, fetcher):
343 fetcher.unpack(self.unpackdir) 343 fetcher.unpack(self.unpackdir)
344 revision = subprocess.check_output("git rev-parse HEAD", shell=True, cwd=self.unpackdir + "/git").strip() 344 revision = bb.process.run("git rev-parse HEAD", shell=True, cwd=self.unpackdir + "/git")[0].strip()
345 self.assertEqual(revision, "270a05b0b4ba0959fe0624d2a4885d7b70426da5") 345 self.assertEqual(revision, "270a05b0b4ba0959fe0624d2a4885d7b70426da5")
346 346
347 self.d.setVar("BB_GENERATE_MIRROR_TARBALLS", "1") 347 self.d.setVar("BB_GENERATE_MIRROR_TARBALLS", "1")
@@ -385,7 +385,7 @@ class FetcherTest(unittest.TestCase):
385 dummyurl = "git://someserver.org/bitbake" 385 dummyurl = "git://someserver.org/bitbake"
386 self.sourcedir = self.unpackdir.replace("unpacked", "sourcemirror.git") 386 self.sourcedir = self.unpackdir.replace("unpacked", "sourcemirror.git")
387 os.chdir(self.tempdir) 387 os.chdir(self.tempdir)
388 subprocess.check_output("git clone %s %s 2> /dev/null" % (realurl, self.sourcedir), shell=True) 388 bb.process.run("git clone %s %s 2> /dev/null" % (realurl, self.sourcedir), shell=True)
389 self.d.setVar("PREMIRRORS", "%s git://%s;protocol=file \n" % (dummyurl, self.sourcedir)) 389 self.d.setVar("PREMIRRORS", "%s git://%s;protocol=file \n" % (dummyurl, self.sourcedir))
390 self.gitfetcher(dummyurl, dummyurl) 390 self.gitfetcher(dummyurl, dummyurl)
391 391