Last active
July 12, 2018 15:07
-
-
Save ahal/a0177e571815471aafe93ff70960574b to your computer and use it in GitHub Desktop.
misc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def getTestManifest(self, options): | |
if isinstance(options.manifestFile, TestManifest): | |
manifest = options.manifestFile | |
elif options.manifestFile and os.path.isfile(options.manifestFile): | |
manifestFileAbs = os.path.abspath(options.manifestFile) | |
assert manifestFileAbs.startswith(SCRIPT_DIR) | |
manifest = TestManifest([options.manifestFile], strict=False) | |
elif (options.manifestFile and | |
os.path.isfile(os.path.join(SCRIPT_DIR, options.manifestFile))): | |
manifestFileAbs = os.path.abspath( | |
os.path.join( | |
SCRIPT_DIR, | |
options.manifestFile)) | |
assert manifestFileAbs.startswith(SCRIPT_DIR) | |
manifest = TestManifest([manifestFileAbs], strict=False) | |
else: | |
masterName = self.normflavor(options.flavor) + '.ini' | |
masterPath = os.path.join(SCRIPT_DIR, self.testRoot, masterName) | |
if os.path.exists(masterPath): | |
manifest = TestManifest([masterPath], strict=False) | |
else: | |
manifest = None | |
self.log.warning( | |
'TestManifest masterPath %s does not exist' % | |
masterPath) | |
return manifest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment