]> code.ossystems Code Review - openembedded-core.git/commitdiff
selftest/bbtests: improve download rename test
authorRoss Burton <ross.burton@intel.com>
Sun, 23 Apr 2017 20:29:39 +0000 (21:29 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 28 Apr 2017 10:26:05 +0000 (11:26 +0100)
This test was assuming the format of SRC_URI so broke when SRC_URI was changed.
Fix the test by hardcoding a complete SRC_URI instead of appending and hoping
for the best.

Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/lib/oeqa/selftest/bbtests.py

index d073433cd517f4ad3c05d2bd10588e76f1c84049..46e09f509f5629467d5378231b8ade8016a14e46 100644 (file)
@@ -151,15 +151,16 @@ doesn't exist, yet fetcher didn't report any error. bitbake output: %s" % result
 
     @testcase(171)
     def test_rename_downloaded_file(self):
+        # TODO unique dldir instead of using cleanall
+        # TODO: need to set sstatedir?
         self.write_config("""DL_DIR = \"${TOPDIR}/download-selftest\"
 SSTATE_DIR = \"${TOPDIR}/download-selftest\"
 """)
         self.track_for_cleanup(os.path.join(self.builddir, "download-selftest"))
 
-        data = 'SRC_URI_append = ";downloadfilename=test-aspell.tar.gz"'
+        data = 'SRC_URI = "${GNU_MIRROR}/aspell/aspell-${PV}.tar.gz;downloadfilename=test-aspell.tar.gz"'
         self.write_recipeinc('aspell', data)
-        bitbake('-ccleanall aspell')
-        result = bitbake('-c fetch aspell', ignore_status=True)
+        result = bitbake('-f -c fetch aspell', ignore_status=True)
         self.delete_recipeinc('aspell')
         self.assertEqual(result.status, 0, msg = "Couldn't fetch aspell. %s" % result.output)
         dl_dir = get_bb_var("DL_DIR")