def testArchiveBuild(self): archive_build.archive_build(self.target, name=self.zip_file, location='out') zip_file_path = os.path.join(self.out_dir, self.zip_file) self.assertTrue(os.path.exists(zip_file_path)) files_list = [os.path.join('out', self.target, x) for x in (BINARY_FILES + INTERMEDIATE_FILES)] self.verifyZipFile(self.out_dir, zip_file_path, files_list)
def testArchiveBuildIgnoreSubfolderNames(self): archive_build.archive_build(self.target, name=self.zip_file, location='out', ignore_subfolder_names=True) zip_file_path = os.path.join(self.out_dir, self.zip_file) self.assertTrue(os.path.exists(zip_file_path)) files_list = [os.path.basename(x) for x in (BINARY_FILES + INTERMEDIATE_FILES)] self.verifyZipFile(self.out_dir, zip_file_path, files_list)
def testArchiveBuildWithFiles(self): files = ['*dir1/test3.o', '../../a.cpp'] archive_build.archive_build(self.target, name=self.zip_file, location='out', files=files) zip_file_path = os.path.join(self.out_dir, self.zip_file) self.assertTrue(os.path.exists(zip_file_path)) files_list = [os.path.join('out', self.target, 'dir1', 'test3.o'), 'a.cpp'] self.verifyZipFile(self.out_dir, zip_file_path, files_list)
def testArchiveBuildWithFilters(self): filters = ['*.so'] archive_build.archive_build(self.target, name=self.zip_file, location='out', filters=filters) zip_file_path = os.path.join(self.out_dir, self.zip_file) self.assertTrue(os.path.exists(zip_file_path)) files_list = [os.path.join('out', self.target, 'dir2', 'lib3.so'), os.path.join('out', self.target, 'lib1.so'), os.path.join('out', self.target, 'lib2.so')] self.verifyZipFile(self.out_dir, zip_file_path, files_list)
def testArchiveBuild(self): archive_build.archive_build(self.target, name=self.zip_file, location='out') zip_file_path = os.path.join(self.out_dir, self.zip_file) self.assertTrue(os.path.exists(zip_file_path)) files_list = [ os.path.join('out', self.target, x) for x in (BINARY_FILES + INTERMEDIATE_FILES) ] self.verifyZipFile(self.out_dir, zip_file_path, files_list)
def testArchiveBuildIgnoreSubfolderNames(self): archive_build.archive_build(self.target, name=self.zip_file, location='out', ignore_subfolder_names=True) zip_file_path = os.path.join(self.out_dir, self.zip_file) self.assertTrue(os.path.exists(zip_file_path)) files_list = [ os.path.basename(x) for x in (BINARY_FILES + INTERMEDIATE_FILES) ] self.verifyZipFile(self.out_dir, zip_file_path, files_list)
def testArchiveBuildWithFiles(self): files = ['*dir1/test3.o', '../../a.cpp'] archive_build.archive_build(self.target, name=self.zip_file, location='out', files=files) zip_file_path = os.path.join(self.out_dir, self.zip_file) self.assertTrue(os.path.exists(zip_file_path)) files_list = [ os.path.join('out', self.target, 'dir1', 'test3.o'), 'a.cpp' ] self.verifyZipFile(self.out_dir, zip_file_path, files_list)
def testArchiveBuildWithFilters(self): filters = ['*.so'] archive_build.archive_build(self.target, name=self.zip_file, location='out', filters=filters) zip_file_path = os.path.join(self.out_dir, self.zip_file) self.assertTrue(os.path.exists(zip_file_path)) files_list = [ os.path.join('out', self.target, 'dir2', 'lib3.so'), os.path.join('out', self.target, 'lib1.so'), os.path.join('out', self.target, 'lib2.so') ] self.verifyZipFile(self.out_dir, zip_file_path, files_list)
def testArchiveBuildWithExcludeFilters(self): exclude_filters = ['*.so'] archive_build.archive_build(self.target, name=self.zip_file, location='out', exclude_filters=exclude_filters) zip_file_path = os.path.join(self.out_dir, self.zip_file) self.assertTrue(os.path.exists(zip_file_path)) out_files = BINARY_FILES + INTERMEDIATE_FILES files_list = [ os.path.join('out', self.target, x) for x in out_files if not x.endswith('.so') ] self.verifyZipFile(self.out_dir, zip_file_path, files_list)