Пример #1
0
    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,
                            attributes=attribute)
        else:
            helper.fail_run_test(name = filePref,
                            binName=filePref,
                            workPath=sandbox,
                            attributes=attribute,
                            describe="build failed")
    rmtree(sandbox)
Пример #2
0
 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,
Пример #3
0
     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,
                                  describe="build failed")
         if (DEBUG):
             sys.stderr.write("DEBUG: Testcase attributes:" +
                              str(attribute))