コード例 #1
0
  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)
コード例 #2
0
  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)
コード例 #3
0
  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)
コード例 #4
0
  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)
コード例 #5
0
    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)
コード例 #6
0
    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)
コード例 #7
0
    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)
コード例 #8
0
    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)
コード例 #9
0
    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)