# Path: md/defines.py
# class Defines(dict):
#     def __contains__(self, key):
#     def __setitem__(self, key, value):
#     def __getitem__(self, key):
#     def combine(self, overridingDefines):
#     def expand(self, inString):
# def normalizeKey(key, lower=True):
# def surround(name):
# def setOverrideDefines(defs, overrideGroup):
# def __setToolDefines(defs, overrideGroup):
# def __setFlagDefines(defs, overrideGroup):
# def setJobSlotsDefines(defs, jobSlots):
# def setPrefixDefines(defs, prefix):
# 
# Path: md/options.py
# class Options(object):
#     def __init__(self):
#     def __str__(self):
#     def targetSpecifiedToBuild(self, targetName):
#     def setStatusLogPath(self, prefix, projectName):
#     def validate(self):
#     def __validateOptionsDir(self, path):
#     def __processImportCommandline(self, commandline):
#     def __processProfileCommandline(self, commandline):
#     def processCommandline(self, commandline=[]):
#     def printUsageAndExit(self, errorStr=""):
#     def printUsage(self, errorStr=""):
# def validateOptionPair(flag, value):
# def validateOption(flag, value):
# 
# Path: md/logger.py
# def secondsToHMS(seconds=0):
# def Logger():
# def setLogger(loggerName="", logOutputDir=""):
# def close():
# def writeMessage(message, targetName="", targetStep="", forceStdOut=False):
# def writeError(message, targetName="", targetStep="", filePath="", lineNumber=0, exitProgram=False):
# def reportSkipped(targetName="", targetStep="", reason=""):
# def reportStart(targetName="", targetStep=""):
# def reportSuccess(targetName="", targetStep="", timeInSeconds=0):
# def reportFailure(targetName="", targetStep="", timeInSeconds=0, returnCode=0, exitProgram=False):
# def getOutFd(targetName="", targetStep=""):
# def getErrorFd(targetName="", targetStep=""):
#     def _writeStdOut(self, message):
#     def _writeStdErr(self, message):
#     def close(self):
#     def writeMessage(self, message, targetName="", targetStep=""):
#     def writeError(self, message, targetName="", targetStep="", filePath="", lineNumber=0, exitProgram=False):
#     def reportSkipped(self, targetName="", targetStep="", reason=""):
#     def reportStart(self, targetName="", targetStep=""):
#     def reportSuccess(self, targetName="", targetStep="", timeInSeconds=0):
#     def reportFailure(self, targetName="", targetStep="", timeInSeconds=0, returnCode=0, exitProgram=False):
#     def getOutFd(self, targetName="", targetStep=""):
#     def getErrorFd(self, targetName="", targetStep=""):
# class LoggerBase(object):
# 
# Path: md/utilityFunctions.py
# def boolToStr(s):
# def downloadFile(URL, downloadDir):
# def executeCommand(command, args="", workingDirectory="", verbose=False, exitOnError=False):
# def executeSubProcess(command, workingDirectory=tempfile.gettempdir(), outFileHandle=1, verbose=False, exitOnError=False):
# def findFilesWithExtension(path, extension):
# def findShallowestFile(startPath, fileList):
# def getBasename(path):
# def haveWriteAccess(path):
# def isURL(url):
# def __pathExists(directory, basename):
# def pathExists(path, forceCaseSensitive=False):
# def prettyPrintList(list, header="", headerIndent="", itemIndent=""):
# def printErrorAndExit(errorStr, filePath="", lineNumber=0):
# def removeDir(path):
# def removeDuplicatesFromList(myList):
# def splitFileName(fileName):
# def stripItemsInList(value):
# def untar(tarPath, outPath="", stripDir=False):
# def unzip(zipPath, outPath="", stripDir=False):
# def URLToFilename(url):
# def hasTarFileExtension(path):
# def validateCompressedFile(path, logger=None):
# def setVariables(filename, variableList):
# def is_exe(fpath):
# def isInstalled(program):


import os, sys, unittest, mdTestUtilities
from md import defines, options, logger, utilityFunctions

            testOptions = options.Options()
            commandline = "MixDown -i --import " + tarPath
            self.assertEquals(testOptions.processCommandline(commandline.split(" ")), True, "Command-line should have processed correctly")
            self.assertEquals(len(testOptions.targetsToImport), 1, "Number of targets to import was wrong")
            self.assertEquals(testOptions.targetsToImport[0].name, "test", "Target had wrong name")
            self.assertEquals(testOptions.targetsToImport[0].path, tarPath, "Target had wrong name")
            self.assertEquals(testOptions.interactive, True, "interactive should have been set")
            self.assertEquals(testOptions.validate(), True, "Command-line options should have validated")
        finally:
            utilityFunctions.removeDir(tempDir)

    def test_processCommandline25(self):
        try:
            tempDir = mdTestUtilities.makeTempDir()
            overrideFilePath = os.path.join(tempDir, "testOverrides")
            mdTestUtilities.createBlankFile(overrideFilePath)
            projectFilePath = os.path.join(tempDir, "test.md")
            mdTestUtilities.createBlankFile(projectFilePath)

            testOptions = options.Options()
            commandline = "MixDown -o" + overrideFilePath + " -ga,b,c " + projectFilePath
            self.assertEquals(testOptions.processCommandline(commandline.split(" ")), True, "Command-line should have processed correctly")
            self.assertEquals(testOptions.overrideFile, overrideFilePath, "overrideFile should have been set")
            self.assertEquals(testOptions.overrideGroup, None, "overrideGroup should not have been set")
            self.assertEquals(testOptions.compilerGroupName, "a", "compilerGroupName should have been set")
            self.assertEquals(testOptions.optimizationGroupName, "b", "optimizationGroupName should have been set")
            self.assertEquals(testOptions.parallelGroupName, "c", "parallelGroupName should have been set")
            self.assertEquals(testOptions.validate(), True, "Command-line options should have validated")
        finally:

# Path: md/defines.py
# class Defines(dict):
#     def __contains__(self, key):
#     def __setitem__(self, key, value):
#     def __getitem__(self, key):
#     def combine(self, overridingDefines):
#     def expand(self, inString):
# def normalizeKey(key, lower=True):
# def surround(name):
# def setOverrideDefines(defs, overrideGroup):
# def __setToolDefines(defs, overrideGroup):
# def __setFlagDefines(defs, overrideGroup):
# def setJobSlotsDefines(defs, jobSlots):
# def setPrefixDefines(defs, prefix):
# 
# Path: md/options.py
# class Options(object):
#     def __init__(self):
#     def __str__(self):
#     def targetSpecifiedToBuild(self, targetName):
#     def setStatusLogPath(self, prefix, projectName):
#     def validate(self):
#     def __validateOptionsDir(self, path):
#     def __processImportCommandline(self, commandline):
#     def __processProfileCommandline(self, commandline):
#     def processCommandline(self, commandline=[]):
#     def printUsageAndExit(self, errorStr=""):
#     def printUsage(self, errorStr=""):
# def validateOptionPair(flag, value):
# def validateOption(flag, value):
# 
# Path: md/logger.py
# def secondsToHMS(seconds=0):
# def Logger():
# def setLogger(loggerName="", logOutputDir=""):
# def close():
# def writeMessage(message, targetName="", targetStep="", forceStdOut=False):
# def writeError(message, targetName="", targetStep="", filePath="", lineNumber=0, exitProgram=False):
# def reportSkipped(targetName="", targetStep="", reason=""):
# def reportStart(targetName="", targetStep=""):
# def reportSuccess(targetName="", targetStep="", timeInSeconds=0):
# def reportFailure(targetName="", targetStep="", timeInSeconds=0, returnCode=0, exitProgram=False):
# def getOutFd(targetName="", targetStep=""):
# def getErrorFd(targetName="", targetStep=""):
#     def _writeStdOut(self, message):
#     def _writeStdErr(self, message):
#     def close(self):
#     def writeMessage(self, message, targetName="", targetStep=""):
#     def writeError(self, message, targetName="", targetStep="", filePath="", lineNumber=0, exitProgram=False):
#     def reportSkipped(self, targetName="", targetStep="", reason=""):
#     def reportStart(self, targetName="", targetStep=""):
#     def reportSuccess(self, targetName="", targetStep="", timeInSeconds=0):
#     def reportFailure(self, targetName="", targetStep="", timeInSeconds=0, returnCode=0, exitProgram=False):
#     def getOutFd(self, targetName="", targetStep=""):
#     def getErrorFd(self, targetName="", targetStep=""):
# class LoggerBase(object):
# 
# Path: md/utilityFunctions.py
# def boolToStr(s):
# def downloadFile(URL, downloadDir):
# def executeCommand(command, args="", workingDirectory="", verbose=False, exitOnError=False):
# def executeSubProcess(command, workingDirectory=tempfile.gettempdir(), outFileHandle=1, verbose=False, exitOnError=False):
# def findFilesWithExtension(path, extension):
# def findShallowestFile(startPath, fileList):
# def getBasename(path):
# def haveWriteAccess(path):
# def isURL(url):
# def __pathExists(directory, basename):
# def pathExists(path, forceCaseSensitive=False):
# def prettyPrintList(list, header="", headerIndent="", itemIndent=""):
# def printErrorAndExit(errorStr, filePath="", lineNumber=0):
# def removeDir(path):
# def removeDuplicatesFromList(myList):
# def splitFileName(fileName):
# def stripItemsInList(value):
# def untar(tarPath, outPath="", stripDir=False):
# def unzip(zipPath, outPath="", stripDir=False):
# def URLToFilename(url):
# def hasTarFileExtension(path):
# def validateCompressedFile(path, logger=None):
# def setVariables(filename, variableList):
# def is_exe(fpath):
# def isInstalled(program):


# Path: test/test_options.py
import os, sys, unittest, mdTestUtilities
from md import defines, options, logger, utilityFunctions


            testOptions = options.Options()
            commandline = "MixDown -i --import " + tarPath
            self.assertEquals(testOptions.processCommandline(commandline.split(" ")), True, "Command-line should have processed correctly")
            self.assertEquals(len(testOptions.targetsToImport), 1, "Number of targets to import was wrong")
            self.assertEquals(testOptions.targetsToImport[0].name, "test", "Target had wrong name")
            self.assertEquals(testOptions.targetsToImport[0].path, tarPath, "Target had wrong name")
            self.assertEquals(testOptions.interactive, True, "interactive should have been set")
            self.assertEquals(testOptions.validate(), True, "Command-line options should have validated")
        finally:
            utilityFunctions.removeDir(tempDir)

    def test_processCommandline25(self):
        try:
            tempDir = mdTestUtilities.makeTempDir()
            overrideFilePath = os.path.join(tempDir, "testOverrides")
            mdTestUtilities.createBlankFile(overrideFilePath)
            projectFilePath = os.path.join(tempDir, "test.md")
            mdTestUtilities.createBlankFile(projectFilePath)

            testOptions = options.Options()
            commandline = "MixDown -o" + overrideFilePath + " -ga,b,c " + projectFilePath
            self.assertEquals(testOptions.processCommandline(commandline.split(" ")), True, "Command-line should have processed correctly")
            self.assertEquals(testOptions.overrideFile, overrideFilePath, "overrideFile should have been set")
            self.assertEquals(testOptions.overrideGroup, None, "overrideGroup should not have been set")
            self.assertEquals(testOptions.compilerGroupName, "a", "compilerGroupName should have been set")
            self.assertEquals(testOptions.optimizationGroupName, "b", "optimizationGroupName should have been set")
            self.assertEquals(testOptions.parallelGroupName, "c", "parallelGroupName should have been set")
            self.assertEquals(testOptions.validate(), True, "Command-line options should have validated")
        finally:

            utilityFunctions.removeDir(tempDir)