예제 #1
0
    def test_preprocessor(self):
        project = Project()
        for libname in self.project_structure.keys():
            files = self.project_structure[libname]
            project.add_files(
                root=os.path.join(self.root, libname),
                library=libname,
                pattern='*.vhd',
                preprocessor=self.preprocessor_path
            )

        self.run_and_check_preprocessors(project)
예제 #2
0
    def testAddAll(self):
        project = Project()
        expected_files = []
        expected_libs = []
        for libname in self.project_structure.keys():
            files = self.project_structure[libname]
            expected_libs.append(libname)
            project.add_files(root=os.path.join(self.root, libname),
                              library=libname,
                              pattern='*.vhd')
            for path in files:
                expected_files.append(os.path.basename(path))

        self.assertEqual(
            sorted(expected_files),
            sorted([os.path.basename(f.path) for f in project.get_files()]),
        )

        self.assertEqual(sorted(expected_libs),
                         sorted(list(project.get_libraries()), ))
예제 #3
0
    def testAddAll(self):
        project = Project()
        expected_files = []
        expected_libs = []
        for libname in self.project_structure.keys():
            files = self.project_structure[libname]
            expected_libs.append(libname)
            project.add_files(
                root=os.path.join(self.root, libname),
                library=libname,
                pattern='*.vhd'
            )
            for path in files:
                expected_files.append(os.path.basename(path))

        self.assertEqual(
            sorted(expected_files),
            sorted([os.path.basename(f.path) for f in project.get_files()]),
        )

        self.assertEqual(
            sorted(expected_libs),
            sorted(list(project.get_libraries()),)
        )