xref: /OK3568_Linux_fs/yocto/poky/meta/lib/oeqa/selftest/cases/archiver.py (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun#
2*4882a593Smuzhiyun# SPDX-License-Identifier: MIT
3*4882a593Smuzhiyun#
4*4882a593Smuzhiyun
5*4882a593Smuzhiyunimport os
6*4882a593Smuzhiyunimport glob
7*4882a593Smuzhiyunfrom oeqa.utils.commands import bitbake, get_bb_vars
8*4882a593Smuzhiyunfrom oeqa.selftest.case import OESelftestTestCase
9*4882a593Smuzhiyun
10*4882a593Smuzhiyunclass Archiver(OESelftestTestCase):
11*4882a593Smuzhiyun
12*4882a593Smuzhiyun    def test_archiver_allows_to_filter_on_recipe_name(self):
13*4882a593Smuzhiyun        """
14*4882a593Smuzhiyun        Summary:     The archiver should offer the possibility to filter on the recipe. (#6929)
15*4882a593Smuzhiyun        Expected:    1. Included recipe (busybox) should be included
16*4882a593Smuzhiyun                     2. Excluded recipe (zlib) should be excluded
17*4882a593Smuzhiyun        Product:     oe-core
18*4882a593Smuzhiyun        Author:      Daniel Istrate <daniel.alexandrux.istrate@intel.com>
19*4882a593Smuzhiyun        AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
20*4882a593Smuzhiyun        """
21*4882a593Smuzhiyun
22*4882a593Smuzhiyun        include_recipe = 'selftest-ed'
23*4882a593Smuzhiyun        exclude_recipe = 'initscripts'
24*4882a593Smuzhiyun
25*4882a593Smuzhiyun        features = 'INHERIT += "archiver"\n'
26*4882a593Smuzhiyun        features += 'ARCHIVER_MODE[src] = "original"\n'
27*4882a593Smuzhiyun        features += 'COPYLEFT_PN_INCLUDE = "%s"\n' % include_recipe
28*4882a593Smuzhiyun        features += 'COPYLEFT_PN_EXCLUDE = "%s"\n' % exclude_recipe
29*4882a593Smuzhiyun        self.write_config(features)
30*4882a593Smuzhiyun
31*4882a593Smuzhiyun        bitbake('-c clean %s %s' % (include_recipe, exclude_recipe))
32*4882a593Smuzhiyun        bitbake("-c deploy_archives %s %s" % (include_recipe, exclude_recipe))
33*4882a593Smuzhiyun
34*4882a593Smuzhiyun        bb_vars = get_bb_vars(['DEPLOY_DIR_SRC', 'TARGET_SYS'])
35*4882a593Smuzhiyun        src_path = os.path.join(bb_vars['DEPLOY_DIR_SRC'], bb_vars['TARGET_SYS'])
36*4882a593Smuzhiyun
37*4882a593Smuzhiyun        # Check that include_recipe was included
38*4882a593Smuzhiyun        included_present = len(glob.glob(src_path + '/%s-*/*' % include_recipe))
39*4882a593Smuzhiyun        self.assertTrue(included_present, 'Recipe %s was not included.' % include_recipe)
40*4882a593Smuzhiyun
41*4882a593Smuzhiyun        # Check that exclude_recipe was excluded
42*4882a593Smuzhiyun        excluded_present = len(glob.glob(src_path + '/%s-*/*' % exclude_recipe))
43*4882a593Smuzhiyun        self.assertFalse(excluded_present, 'Recipe %s was not excluded.' % exclude_recipe)
44*4882a593Smuzhiyun
45*4882a593Smuzhiyun    def test_archiver_filters_by_type(self):
46*4882a593Smuzhiyun        """
47*4882a593Smuzhiyun        Summary:     The archiver is documented to filter on the recipe type.
48*4882a593Smuzhiyun        Expected:    1. included recipe type (target) should be included
49*4882a593Smuzhiyun                     2. other types should be excluded
50*4882a593Smuzhiyun        Product:     oe-core
51*4882a593Smuzhiyun        Author:      André Draszik <adraszik@tycoint.com>
52*4882a593Smuzhiyun        """
53*4882a593Smuzhiyun
54*4882a593Smuzhiyun        target_recipe = 'selftest-ed'
55*4882a593Smuzhiyun        native_recipe = 'selftest-ed-native'
56*4882a593Smuzhiyun
57*4882a593Smuzhiyun        features = 'INHERIT += "archiver"\n'
58*4882a593Smuzhiyun        features += 'ARCHIVER_MODE[src] = "original"\n'
59*4882a593Smuzhiyun        features += 'COPYLEFT_RECIPE_TYPES = "target"\n'
60*4882a593Smuzhiyun        self.write_config(features)
61*4882a593Smuzhiyun
62*4882a593Smuzhiyun        bitbake('-c clean %s %s' % (target_recipe, native_recipe))
63*4882a593Smuzhiyun        bitbake("%s -c deploy_archives %s" % (target_recipe, native_recipe))
64*4882a593Smuzhiyun
65*4882a593Smuzhiyun        bb_vars = get_bb_vars(['DEPLOY_DIR_SRC', 'TARGET_SYS', 'BUILD_SYS'])
66*4882a593Smuzhiyun        src_path_target = os.path.join(bb_vars['DEPLOY_DIR_SRC'], bb_vars['TARGET_SYS'])
67*4882a593Smuzhiyun        src_path_native = os.path.join(bb_vars['DEPLOY_DIR_SRC'], bb_vars['BUILD_SYS'])
68*4882a593Smuzhiyun
69*4882a593Smuzhiyun        # Check that target_recipe was included
70*4882a593Smuzhiyun        included_present = len(glob.glob(src_path_target + '/%s-*/*' % target_recipe))
71*4882a593Smuzhiyun        self.assertTrue(included_present, 'Recipe %s was not included.' % target_recipe)
72*4882a593Smuzhiyun
73*4882a593Smuzhiyun        # Check that native_recipe was excluded
74*4882a593Smuzhiyun        excluded_present = len(glob.glob(src_path_native + '/%s-*/*' % native_recipe))
75*4882a593Smuzhiyun        self.assertFalse(excluded_present, 'Recipe %s was not excluded.' % native_recipe)
76*4882a593Smuzhiyun
77*4882a593Smuzhiyun    def test_archiver_filters_by_type_and_name(self):
78*4882a593Smuzhiyun        """
79*4882a593Smuzhiyun        Summary:     Test that the archiver archives by recipe type, taking the
80*4882a593Smuzhiyun                     recipe name into account.
81*4882a593Smuzhiyun        Expected:    1. included recipe type (target) should be included
82*4882a593Smuzhiyun                     2. other types should be excluded
83*4882a593Smuzhiyun                     3. recipe by name should be included / excluded,
84*4882a593Smuzhiyun                        overriding previous decision by type
85*4882a593Smuzhiyun        Product:     oe-core
86*4882a593Smuzhiyun        Author:      André Draszik <adraszik@tycoint.com>
87*4882a593Smuzhiyun        """
88*4882a593Smuzhiyun
89*4882a593Smuzhiyun        target_recipes = [ 'initscripts', 'selftest-ed' ]
90*4882a593Smuzhiyun        native_recipes = [ 'update-rc.d-native', 'selftest-ed-native' ]
91*4882a593Smuzhiyun
92*4882a593Smuzhiyun        features = 'INHERIT += "archiver"\n'
93*4882a593Smuzhiyun        features += 'ARCHIVER_MODE[src] = "original"\n'
94*4882a593Smuzhiyun        features += 'COPYLEFT_RECIPE_TYPES = "target"\n'
95*4882a593Smuzhiyun        features += 'COPYLEFT_PN_INCLUDE = "%s"\n' % native_recipes[1]
96*4882a593Smuzhiyun        features += 'COPYLEFT_PN_EXCLUDE = "%s"\n' % target_recipes[1]
97*4882a593Smuzhiyun        self.write_config(features)
98*4882a593Smuzhiyun
99*4882a593Smuzhiyun        bitbake('-c clean %s %s' % (' '.join(target_recipes), ' '.join(native_recipes)))
100*4882a593Smuzhiyun        bitbake('-c deploy_archives %s %s' % (' '.join(target_recipes), ' '.join(native_recipes)))
101*4882a593Smuzhiyun
102*4882a593Smuzhiyun        bb_vars = get_bb_vars(['DEPLOY_DIR_SRC', 'TARGET_SYS', 'BUILD_SYS'])
103*4882a593Smuzhiyun        src_path_target = os.path.join(bb_vars['DEPLOY_DIR_SRC'], bb_vars['TARGET_SYS'])
104*4882a593Smuzhiyun        src_path_native = os.path.join(bb_vars['DEPLOY_DIR_SRC'], bb_vars['BUILD_SYS'])
105*4882a593Smuzhiyun
106*4882a593Smuzhiyun        # Check that target_recipe[0] and native_recipes[1] were included
107*4882a593Smuzhiyun        included_present = len(glob.glob(src_path_target + '/%s-*/*' % target_recipes[0]))
108*4882a593Smuzhiyun        self.assertTrue(included_present, 'Recipe %s was not included.' % target_recipes[0])
109*4882a593Smuzhiyun
110*4882a593Smuzhiyun        included_present = len(glob.glob(src_path_native + '/%s-*/*' % native_recipes[1]))
111*4882a593Smuzhiyun        self.assertTrue(included_present, 'Recipe %s was not included.' % native_recipes[1])
112*4882a593Smuzhiyun
113*4882a593Smuzhiyun        # Check that native_recipes[0] and target_recipes[1] were excluded
114*4882a593Smuzhiyun        excluded_present = len(glob.glob(src_path_native + '/%s-*/*' % native_recipes[0]))
115*4882a593Smuzhiyun        self.assertFalse(excluded_present, 'Recipe %s was not excluded.' % native_recipes[0])
116*4882a593Smuzhiyun
117*4882a593Smuzhiyun        excluded_present = len(glob.glob(src_path_target + '/%s-*/*' % target_recipes[1]))
118*4882a593Smuzhiyun        self.assertFalse(excluded_present, 'Recipe %s was not excluded.' % target_recipes[1])
119*4882a593Smuzhiyun
120*4882a593Smuzhiyun
121*4882a593Smuzhiyun
122*4882a593Smuzhiyun    def test_archiver_srpm_mode(self):
123*4882a593Smuzhiyun        """
124*4882a593Smuzhiyun        Test that in srpm mode, the added recipe dependencies at least exist/work [YOCTO #11121]
125*4882a593Smuzhiyun        """
126*4882a593Smuzhiyun
127*4882a593Smuzhiyun        features = 'INHERIT += "archiver"\n'
128*4882a593Smuzhiyun        features += 'ARCHIVER_MODE[srpm] = "1"\n'
129*4882a593Smuzhiyun        features += 'PACKAGE_CLASSES = "package_rpm"\n'
130*4882a593Smuzhiyun        self.write_config(features)
131*4882a593Smuzhiyun
132*4882a593Smuzhiyun        bitbake('-n selftest-nopackages selftest-ed')
133*4882a593Smuzhiyun
134*4882a593Smuzhiyun    def _test_archiver_mode(self, mode, target_file_name, extra_config=None):
135*4882a593Smuzhiyun        target = 'selftest-ed-native'
136*4882a593Smuzhiyun
137*4882a593Smuzhiyun        features = 'INHERIT += "archiver"\n'
138*4882a593Smuzhiyun        features +=  'ARCHIVER_MODE[src] = "%s"\n' % (mode)
139*4882a593Smuzhiyun        if extra_config:
140*4882a593Smuzhiyun            features += extra_config
141*4882a593Smuzhiyun        self.write_config(features)
142*4882a593Smuzhiyun
143*4882a593Smuzhiyun        bitbake('-c clean %s' % (target))
144*4882a593Smuzhiyun        bitbake('-c deploy_archives %s' % (target))
145*4882a593Smuzhiyun
146*4882a593Smuzhiyun        bb_vars = get_bb_vars(['DEPLOY_DIR_SRC', 'BUILD_SYS'])
147*4882a593Smuzhiyun        glob_str = os.path.join(bb_vars['DEPLOY_DIR_SRC'], bb_vars['BUILD_SYS'], '%s-*' % (target))
148*4882a593Smuzhiyun        glob_result = glob.glob(glob_str)
149*4882a593Smuzhiyun        self.assertTrue(glob_result, 'Missing archiver directory for %s' % (target))
150*4882a593Smuzhiyun
151*4882a593Smuzhiyun        archive_path = os.path.join(glob_result[0], target_file_name)
152*4882a593Smuzhiyun        self.assertTrue(os.path.exists(archive_path), 'Missing archive file %s' % (target_file_name))
153*4882a593Smuzhiyun
154*4882a593Smuzhiyun    def test_archiver_mode_original(self):
155*4882a593Smuzhiyun        """
156*4882a593Smuzhiyun        Test that the archiver works with `ARCHIVER_MODE[src] = "original"`.
157*4882a593Smuzhiyun        """
158*4882a593Smuzhiyun
159*4882a593Smuzhiyun        self._test_archiver_mode('original', 'ed-1.14.1.tar.lz')
160*4882a593Smuzhiyun
161*4882a593Smuzhiyun    def test_archiver_mode_patched(self):
162*4882a593Smuzhiyun        """
163*4882a593Smuzhiyun        Test that the archiver works with `ARCHIVER_MODE[src] = "patched"`.
164*4882a593Smuzhiyun        """
165*4882a593Smuzhiyun
166*4882a593Smuzhiyun        self._test_archiver_mode('patched', 'selftest-ed-native-1.14.1-r0-patched.tar.xz')
167*4882a593Smuzhiyun
168*4882a593Smuzhiyun    def test_archiver_mode_configured(self):
169*4882a593Smuzhiyun        """
170*4882a593Smuzhiyun        Test that the archiver works with `ARCHIVER_MODE[src] = "configured"`.
171*4882a593Smuzhiyun        """
172*4882a593Smuzhiyun
173*4882a593Smuzhiyun        self._test_archiver_mode('configured', 'selftest-ed-native-1.14.1-r0-configured.tar.xz')
174*4882a593Smuzhiyun
175*4882a593Smuzhiyun    def test_archiver_mode_recipe(self):
176*4882a593Smuzhiyun        """
177*4882a593Smuzhiyun        Test that the archiver works with `ARCHIVER_MODE[recipe] = "1"`.
178*4882a593Smuzhiyun        """
179*4882a593Smuzhiyun
180*4882a593Smuzhiyun        self._test_archiver_mode('patched', 'selftest-ed-native-1.14.1-r0-recipe.tar.xz',
181*4882a593Smuzhiyun                                 'ARCHIVER_MODE[recipe] = "1"\n')
182*4882a593Smuzhiyun
183*4882a593Smuzhiyun    def test_archiver_mode_diff(self):
184*4882a593Smuzhiyun        """
185*4882a593Smuzhiyun        Test that the archiver works with `ARCHIVER_MODE[diff] = "1"`.
186*4882a593Smuzhiyun        Exclusions controlled by `ARCHIVER_MODE[diff-exclude]` are not yet tested.
187*4882a593Smuzhiyun        """
188*4882a593Smuzhiyun
189*4882a593Smuzhiyun        self._test_archiver_mode('patched', 'selftest-ed-native-1.14.1-r0-diff.gz',
190*4882a593Smuzhiyun                                 'ARCHIVER_MODE[diff] = "1"\n')
191*4882a593Smuzhiyun
192*4882a593Smuzhiyun    def test_archiver_mode_dumpdata(self):
193*4882a593Smuzhiyun        """
194*4882a593Smuzhiyun        Test that the archiver works with `ARCHIVER_MODE[dumpdata] = "1"`.
195*4882a593Smuzhiyun        """
196*4882a593Smuzhiyun
197*4882a593Smuzhiyun        self._test_archiver_mode('patched', 'selftest-ed-native-1.14.1-r0-showdata.dump',
198*4882a593Smuzhiyun                                 'ARCHIVER_MODE[dumpdata] = "1"\n')
199*4882a593Smuzhiyun
200*4882a593Smuzhiyun    def test_archiver_mode_mirror(self):
201*4882a593Smuzhiyun        """
202*4882a593Smuzhiyun        Test that the archiver works with `ARCHIVER_MODE[src] = "mirror"`.
203*4882a593Smuzhiyun        """
204*4882a593Smuzhiyun
205*4882a593Smuzhiyun        self._test_archiver_mode('mirror', 'ed-1.14.1.tar.lz',
206*4882a593Smuzhiyun                                 'BB_GENERATE_MIRROR_TARBALLS = "1"\n')
207*4882a593Smuzhiyun
208*4882a593Smuzhiyun    def test_archiver_mode_mirror_excludes(self):
209*4882a593Smuzhiyun        """
210*4882a593Smuzhiyun        Test that the archiver works with `ARCHIVER_MODE[src] = "mirror"` and
211*4882a593Smuzhiyun        correctly excludes an archive when its URL matches
212*4882a593Smuzhiyun        `ARCHIVER_MIRROR_EXCLUDE`.
213*4882a593Smuzhiyun        """
214*4882a593Smuzhiyun
215*4882a593Smuzhiyun        target='selftest-ed'
216*4882a593Smuzhiyun        target_file_name = 'ed-1.14.1.tar.lz'
217*4882a593Smuzhiyun
218*4882a593Smuzhiyun        features = 'INHERIT += "archiver"\n'
219*4882a593Smuzhiyun        features += 'ARCHIVER_MODE[src] = "mirror"\n'
220*4882a593Smuzhiyun        features += 'BB_GENERATE_MIRROR_TARBALLS = "1"\n'
221*4882a593Smuzhiyun        features += 'ARCHIVER_MIRROR_EXCLUDE = "${GNU_MIRROR}"\n'
222*4882a593Smuzhiyun        self.write_config(features)
223*4882a593Smuzhiyun
224*4882a593Smuzhiyun        bitbake('-c clean %s' % (target))
225*4882a593Smuzhiyun        bitbake('-c deploy_archives %s' % (target))
226*4882a593Smuzhiyun
227*4882a593Smuzhiyun        bb_vars = get_bb_vars(['DEPLOY_DIR_SRC', 'TARGET_SYS'])
228*4882a593Smuzhiyun        glob_str = os.path.join(bb_vars['DEPLOY_DIR_SRC'], bb_vars['TARGET_SYS'], '%s-*' % (target))
229*4882a593Smuzhiyun        glob_result = glob.glob(glob_str)
230*4882a593Smuzhiyun        self.assertTrue(glob_result, 'Missing archiver directory for %s' % (target))
231*4882a593Smuzhiyun
232*4882a593Smuzhiyun        archive_path = os.path.join(glob_result[0], target_file_name)
233*4882a593Smuzhiyun        self.assertFalse(os.path.exists(archive_path), 'Failed to exclude archive file %s' % (target_file_name))
234*4882a593Smuzhiyun
235*4882a593Smuzhiyun    def test_archiver_mode_mirror_combined(self):
236*4882a593Smuzhiyun        """
237*4882a593Smuzhiyun        Test that the archiver works with `ARCHIVER_MODE[src] = "mirror"`
238*4882a593Smuzhiyun        and `ARCHIVER_MODE[mirror] = "combined"`. Archives for multiple recipes
239*4882a593Smuzhiyun        should all end up in the 'mirror' directory.
240*4882a593Smuzhiyun        """
241*4882a593Smuzhiyun
242*4882a593Smuzhiyun        features = 'INHERIT += "archiver"\n'
243*4882a593Smuzhiyun        features += 'ARCHIVER_MODE[src] = "mirror"\n'
244*4882a593Smuzhiyun        features += 'ARCHIVER_MODE[mirror] = "combined"\n'
245*4882a593Smuzhiyun        features += 'BB_GENERATE_MIRROR_TARBALLS = "1"\n'
246*4882a593Smuzhiyun        features += 'COPYLEFT_LICENSE_INCLUDE = "*"\n'
247*4882a593Smuzhiyun        self.write_config(features)
248*4882a593Smuzhiyun
249*4882a593Smuzhiyun        for target in ['selftest-ed', 'selftest-hardlink']:
250*4882a593Smuzhiyun            bitbake('-c clean %s' % (target))
251*4882a593Smuzhiyun            bitbake('-c deploy_archives %s' % (target))
252*4882a593Smuzhiyun
253*4882a593Smuzhiyun        bb_vars = get_bb_vars(['DEPLOY_DIR_SRC'])
254*4882a593Smuzhiyun        for target_file_name in ['ed-1.14.1.tar.lz', 'hello.c']:
255*4882a593Smuzhiyun            glob_str = os.path.join(bb_vars['DEPLOY_DIR_SRC'], 'mirror', target_file_name)
256*4882a593Smuzhiyun            glob_result = glob.glob(glob_str)
257*4882a593Smuzhiyun            self.assertTrue(glob_result, 'Missing archive file %s' % (target_file_name))
258*4882a593Smuzhiyun
259*4882a593Smuzhiyun    def test_archiver_mode_mirror_gitsm(self):
260*4882a593Smuzhiyun        """
261*4882a593Smuzhiyun        Test that the archiver correctly handles git submodules with
262*4882a593Smuzhiyun        `ARCHIVER_MODE[src] = "mirror"`.
263*4882a593Smuzhiyun        """
264*4882a593Smuzhiyun        features = 'INHERIT += "archiver"\n'
265*4882a593Smuzhiyun        features += 'ARCHIVER_MODE[src] = "mirror"\n'
266*4882a593Smuzhiyun        features += 'ARCHIVER_MODE[mirror] = "combined"\n'
267*4882a593Smuzhiyun        features += 'BB_GENERATE_MIRROR_TARBALLS = "1"\n'
268*4882a593Smuzhiyun        features += 'COPYLEFT_LICENSE_INCLUDE = "*"\n'
269*4882a593Smuzhiyun        self.write_config(features)
270*4882a593Smuzhiyun
271*4882a593Smuzhiyun        bitbake('-c clean git-submodule-test')
272*4882a593Smuzhiyun        bitbake('-c deploy_archives -f git-submodule-test')
273*4882a593Smuzhiyun
274*4882a593Smuzhiyun        bb_vars = get_bb_vars(['DEPLOY_DIR_SRC'])
275*4882a593Smuzhiyun        for target_file_name in [
276*4882a593Smuzhiyun            'git2_git.yoctoproject.org.git-submodule-test.tar.gz',
277*4882a593Smuzhiyun            'git2_git.yoctoproject.org.bitbake-gitsm-test1.tar.gz',
278*4882a593Smuzhiyun            'git2_git.yoctoproject.org.bitbake-gitsm-test2.tar.gz',
279*4882a593Smuzhiyun            'git2_git.openembedded.org.bitbake.tar.gz'
280*4882a593Smuzhiyun        ]:
281*4882a593Smuzhiyun            target_path = os.path.join(bb_vars['DEPLOY_DIR_SRC'], 'mirror', target_file_name)
282*4882a593Smuzhiyun            self.assertTrue(os.path.exists(target_path))
283*4882a593Smuzhiyun
284*4882a593Smuzhiyun    def test_archiver_mode_mirror_gitsm_shallow(self):
285*4882a593Smuzhiyun        """
286*4882a593Smuzhiyun        Test that the archiver correctly handles git submodules with
287*4882a593Smuzhiyun        `ARCHIVER_MODE[src] = "mirror"`.
288*4882a593Smuzhiyun        """
289*4882a593Smuzhiyun        features = 'INHERIT += "archiver"\n'
290*4882a593Smuzhiyun        features += 'ARCHIVER_MODE[src] = "mirror"\n'
291*4882a593Smuzhiyun        features += 'ARCHIVER_MODE[mirror] = "combined"\n'
292*4882a593Smuzhiyun        features += 'BB_GENERATE_MIRROR_TARBALLS = "1"\n'
293*4882a593Smuzhiyun        features += 'COPYLEFT_LICENSE_INCLUDE = "*"\n'
294*4882a593Smuzhiyun        features += 'BB_GIT_SHALLOW = "1"\n'
295*4882a593Smuzhiyun        features += 'BB_GENERATE_SHALLOW_TARBALLS = "1"\n'
296*4882a593Smuzhiyun        features += 'DL_DIR = "${TOPDIR}/downloads-shallow"\n'
297*4882a593Smuzhiyun        self.write_config(features)
298*4882a593Smuzhiyun
299*4882a593Smuzhiyun        bitbake('-c clean git-submodule-test')
300*4882a593Smuzhiyun        bitbake('-c deploy_archives -f git-submodule-test')
301*4882a593Smuzhiyun
302*4882a593Smuzhiyun        bb_vars = get_bb_vars(['DEPLOY_DIR_SRC'])
303*4882a593Smuzhiyun        for target_file_name in [
304*4882a593Smuzhiyun            'gitsmshallow_git.yoctoproject.org.git-submodule-test_a2885dd-1_master.tar.gz',
305*4882a593Smuzhiyun            'gitsmshallow_git.yoctoproject.org.bitbake-gitsm-test1_bare_120f4c7-1.tar.gz',
306*4882a593Smuzhiyun            'gitsmshallow_git.yoctoproject.org.bitbake-gitsm-test2_bare_f66699e-1.tar.gz',
307*4882a593Smuzhiyun            'gitsmshallow_git.openembedded.org.bitbake_bare_52a144a-1.tar.gz',
308*4882a593Smuzhiyun            'gitsmshallow_git.openembedded.org.bitbake_bare_c39b997-1.tar.gz'
309*4882a593Smuzhiyun        ]:
310*4882a593Smuzhiyun            target_path = os.path.join(bb_vars['DEPLOY_DIR_SRC'], 'mirror', target_file_name)
311*4882a593Smuzhiyun            self.assertTrue(os.path.exists(target_path))
312