Example #1
0
    def setUpClass(cls):
        cls.tempDir = tempfile.TemporaryDirectory()
        for i in range(10):
            sampleName = 'sample{}.h'.format(i)
            filePath = os.path.join(cls.tempDir.name, '{}.h'.format(sampleName))
            with open(filePath, 'w') as f:
                f.write('#define {}'.format(sampleName))

        cls.includePaths = list(sorted(clcache.filesBeneath(cls.tempDir.name)))
        cls.manifestHash = 'ffffffffffffffffffffffffffffffff'
        cls.expectedManifestEntry = clcache.createManifestEntry(TestCreateManifestEntry.manifestHash,
                                                                TestCreateManifestEntry.includePaths)
Example #2
0
 def testIsConsistentWithDuplicateEntries(self):
     includePathsWithDuplicates = TestCreateManifestEntry.includePaths + TestCreateManifestEntry.includePaths
     entry = clcache.createManifestEntry(TestCreateManifestEntry.manifestHash, includePathsWithDuplicates)
     self.assertManifestEntryIsCorrect(entry)
Example #3
0
 def testIsConsistentWithReverseList(self):
     reversedIncludePaths = list(reversed(TestCreateManifestEntry.includePaths))
     entry = clcache.createManifestEntry(TestCreateManifestEntry.manifestHash, reversedIncludePaths)
     self.assertManifestEntryIsCorrect(entry)
Example #4
0
 def testIsConsistentWithSameInput(self):
     entry = clcache.createManifestEntry(TestCreateManifestEntry.manifestHash, TestCreateManifestEntry.includePaths)
     self.assertManifestEntryIsCorrect(entry)