def reportToDirWithName(self, inputs=[], toDir=None, mainFileName=None, report=EMMA_REPORT.HTML, sourcepath=[], commonoptions={}):
        options = ""
        if inputs:
            options += " -input "
            for f in inputs:
                options += f + ","
            options = options[0:-1]
        
        options += " -report " + report
        
        if sourcepath:
            options +=  " -sourcepath "
            for src in sourcepath:
                options += src + ","
            options = options[0:-1]
        
        if not mainFileName:
            mainFileName = "coverage"
        if not toDir:
            toDir=""
            
        if report == EMMA_REPORT.HTML:
            opt = "report.html.out.file"
            value = os.path.join(toDir, "coverage", "%s.html" % mainFileName)
        elif report == EMMA_REPORT.XML:
            opt = "report.xml.out.file" 
            value = os.path.join(toDir, "%s.xml" % mainFileName)
        elif report == EMMA_REPORT.TXT:
            opt = "report.txt.out.file"
            value = os.path.join(toDir, "%s.txt" % mainFileName)
        options  += " -D%s=%s" % (opt, value)
        
        if commonoptions:
            for entry in commonoptions.iteritems():
                options += " -D" + entry[0] + "=" + entry[1]
        
        cmd = self._previewEmmaCmd("emma report", options)
        (returnCode, outputStr) = self._runEmmaCommand(cmd)
        return self._interpResultsEmmaReportCmd(returnCode, outputStr)

#===============================================================================
# emma_helper = EmmaInterface()
# emma_helper.report(inputs=["coverage.ec", "coverage.em"], commonoptions={"report.html.out.file" : "mycoverage/coverage.html", "testkey" : "testvalue"})
#===============================================================================
Check if the given data is a valid csrf token.
dataset/ETHPy150Open zyrikby/BBoxTester/BBoxTester/interfaces/emma_interface.py/EmmaInterface.reportToDirWithName--crossover with--dataset/ETHPy150Open RoseOu/flasky/venv/lib/python2.7/site-packages/flask_wtf/csrf.py/validate_csrf