Beispiel #1
0
def main():
    global opts
    global args
    os.umask(0o001)
    if(DEBUG):
        sys.stderr.write(str(opts))
###-------parser_end-------------

    workingDir = opts.workspace
##yamlからの設定の読み込み

#各ファイルのビルド、テストの実行
    if(DEBUG):
        sys.stderr.write(opts.yamlDir+"/*.yaml is loaded")
    yamlFiles = os.listdir( opts.yamlDir )
    if(DEBUG):
        sys.stderr.write(str(yamlFiles))
    helper.initTap(len(yamlFiles)*2)

    for filename in yamlFiles:
        filePref, ext = os.path.splitext(filename)
        if ext != ".yaml":
            continue

        sandbox    = workingDir+"/"+filePref

        initDir(sandbox)
        #print("load yamlfile:"+filename)
        attributes = helper.loadFromYaml(
            opts.yamlDir+"/"+filename,
            testcase=opts.testcase)

        for attribute in attributes:
            attribute["node"] = opts.maxNode

            buildresult = build_test(filePref,
                        opts.x10Dir+"/"+filePref+".x10",
                        sandbox,
                        opts.srcDir)
            if buildresult == 0:
                run_test(name=filePref,
                binName=filePref,
                workPath=sandbox,
                mpi=opts.mpi,
                attributes=attribute)
            else:
                fail_run_test(name = filePref,
                        binName=filePref,
                        workPath=sandbox,
                        attributes=attribute,
                        describe="build failed")
            rmtree(sandbox)

    if(DEBUG):
        sys.stderr.write("DEBUG: Testcase attributes:" + str(attribute))
Beispiel #2
0
yamlFiles = os.listdir( opts.yamlDir )
if(DEBUG):
    sys.stderr.write(str(yamlFiles))
helper.initTap(len(yamlFiles)*2)

for filename in yamlFiles:
    filePref, ext = os.path.splitext(filename)
    if ext != ".yaml":
        continue

    sandbox    = workingDir+"/"+filePref

    helper.initDir(sandbox)
    #print("load yamlfile:"+filename)
    attributes = helper.loadFromYaml(
        opts.yamlDir+"/"+filename,
        testcase=opts.testcase)

    for attribute in attributes:
        attribute["node"] = opts.maxNode

        buildresult = helper.build_test(filePref,
                        opts.x10Dir+"/"+filePref+".x10",
                        sandbox,
                        opts.srcDir)

        if buildresult == 0:
            helper.run_test(name=filePref,
                            binName=filePref,
                            workPath=sandbox,
                            mpi=opts.mpi,
Beispiel #3
0
for dirpath , dirnames, filenames in os.walk(src_dir):
    #sys.stderr.write(dirpath+"\n")
    yamlfiles = [filename for filename in filenames
                 if os.path.splitext(filename)[1] == ".yaml"]
    #print(yamlfiles)
    for yamlfile in yamlfiles:
        fpfx = os.path.splitext(yamlfile)[0]
        yamlfilepath = os.path.join(dirpath, yamlfile)
        x10filepath  = os.path.join(dirpath, fpfx+".x10")
        tmpdir = tempfile.TemporaryDirectory(dir=os.path.expandvars("$prefix"))
        sandbox = tmpdir.name
        #sys.stderr.write("create temporary directory:"+sandbox)
        helper.initDir(sandbox)
        attributes = helper.loadFromYaml(
            yamlfilepath,
            testcase=opts.testcase
        )
        for attribute in attributes:
            attribute["node"] = opts.maxNode
            buildresult = helper.build_test(
                fpfx,
                x10filepath,
                sandbox,
                opts.src_dir
            )
            if buildresult == 0:
                helper.run_test(
                    name=fpfx,
                    binName=fpfx,
                    workPath=sandbox,
                    mpi=opts.mpi,
Beispiel #4
0
for dirpath, dirnames, filenames in os.walk(src_dir):
    #sys.stderr.write(dirpath+"\n")
    yamlfiles = [
        filename for filename in filenames
        if os.path.splitext(filename)[1] == ".yaml"
    ]
    #print(yamlfiles)
    for yamlfile in yamlfiles:
        fpfx = os.path.splitext(yamlfile)[0]
        yamlfilepath = os.path.join(dirpath, yamlfile)
        x10filepath = os.path.join(dirpath, fpfx + ".x10")
        tmpdir = tempfile.TemporaryDirectory(dir=os.path.expandvars("$prefix"))
        sandbox = tmpdir.name
        #sys.stderr.write("create temporary directory:"+sandbox)
        helper.initDir(sandbox)
        attributes = helper.loadFromYaml(yamlfilepath, testcase=opts.testcase)
        for attribute in attributes:
            attribute["node"] = opts.maxNode
            buildresult = helper.build_test(fpfx, x10filepath, sandbox,
                                            opts.src_dir)
            if buildresult == 0:
                helper.run_test(name=fpfx,
                                binName=fpfx,
                                workPath=sandbox,
                                mpi=opts.mpi,
                                attributes=attribute)
            else:
                helper.fail_run_test(name=fpfx,
                                     binName=fpfx,
                                     workPath=sandbox,
                                     attributes=attribute,