Beispiel #1
0
def fft_subtests(fft_folder,lf):
    for x in range(1,5):
        lf.write("\n" + centerText(" Test " + str(x) + " ") + "\n")
        lf.flush
        p = sp.Popen(['make', '-C', fft_folder, 'test' + str(x), 'OPT_PASSES="-TMR -replicateFnCalls=KISS_FFT_MALLOC,kiss_fftr_alloc,kiss_fftnd_alloc,kiss_fftndr_alloc,kiss_fft_alloc"'], stdout=sp.PIPE, stderr=sp.PIPE, universal_newlines=True)
        output, errs = p.communicate()
        for line in output:
            lf.write(line)
        lf.flush()
        for line in errs:
            lf.write(line)
        lf.flush()
        printProgress(x+1,5)
        runMakeClean(fft_folder)
    return
Beispiel #2
0
def testCoremark(testLog, nowFolder):
    # Coremark:
    coremark_folder = os.path.expanduser("~/llvm/tests/coremark/")
    logFile = createNewLogfile("coremark", nowFolder)
    printIntro(coremark_folder, logFile, ['', '-TMR'])
    with open(logFile, 'a') as lf:
        runMakeClean(coremark_folder)
        # run it without any TMR to get correct output values
        p = sp.Popen(['make', '-C', coremark_folder, 'run'],
                     stdout=lf,
                     stderr=lf,
                     universal_newlines=True)
        p.wait()
        rc = p.returncode
        if not rc:
            # copy the coremark log files into the current log file
            copyCoremarkLogfile(coremark_folder, "run1.log", lf)
            copyCoremarkLogfile(coremark_folder, "run2.log", lf)
        else:
            lf.write("==== Error, did not execute! ====")
        printProgress(1, 2)
        # flush the output buffer to make sure this shows up in the right place
        lf.flush()
        runMakeClean(coremark_folder)
        # run with TMR
        p = sp.Popen([
            'make', '-C', coremark_folder, 'run',
            'OPT_PASSES="-TMR -replicateFnCalls=portable_malloc"'
        ],
                     universal_newlines=True,
                     stdout=lf,
                     stderr=lf)
        p.wait()
        rc = p.returncode
        if not rc:
            # copy the coremark log files into the current log file
            copyCoremarkLogfile(coremark_folder, "run1.log", lf)
            copyCoremarkLogfile(coremark_folder, "run2.log", lf)
        else:
            lf.write("==== Error, did not execute! ====")
        lf.flush()
        runMakeClean(coremark_folder)
    testLog.write("Finished testing in " + coremark_folder + "at time ")
    testLog.write(str(datetime.datetime.now()) + "\n")
    testLog.write("See log file\n\t" + logFile + "\n\n")
    print("Complete! (2/2)")
    os.system("date")
Beispiel #3
0
def testKissFFT130(testLog, nowFolder):
    # kiss_fft130
    fft_folder = os.path.expanduser("~/coast/tests/kiss_fft130/custom/")
    logFile = createNewLogfile("kiss_fft130", nowFolder)
    printIntro(fft_folder, logFile, ['', '-TMR'])
    with open(logFile, 'a') as lf:
        runMakeClean(fft_folder)
        # run it without any TMR to get correct output values
        lf.write("\n" + centerText(" Control test ") + "\n")
        lf.flush()
        p = sp.Popen(['make', '-C', fft_folder, 'test'], stdout=lf, stderr=lf, universal_newlines=True)
        p.wait()
        printProgress(1,5)
        runMakeClean(fft_folder)
        # now run it with TMR with each of the 4 tests
        fft_subtests(fft_folder,lf)
    testLog.write("Finished testing in " + fft_folder + "at time ")
    testLog.write(str(datetime.datetime.now()) + "\n")
    testLog.write("See log file\n\t" + logFile + "\n\n")
    print("Complete! (5/5)")
    os.system("date")
Beispiel #4
0
def updateConsoleDisplay(srcFolder, totalRuns, testNum):
    print("Testing in: " + srcFolder)
    printProgress(testNum, totalRuns)
    print("\r", end="")
Beispiel #5
0
def updateConsoleDisplay(srcFile, totalRuns, testNum):
    print("Testing: " + srcFile)
    printProgress(testNum,totalRuns)
    print("\r", end="")