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))
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 helper.initDir(sandbox) #print("load yamlfile:"+filename) attributes = helper.loadFromYaml( opts.yamlDir+"/"+filename, testcase=opts.testcase) for attribute in attributes:
(opts, args) = parser.parse_args() #os.umask(0o001) if(DEBUG): sys.stderr.write(str(opts)) ###-------parser_end------------- workingDir = opts.workspace ##yamlからの設定の読み込み testcases = 2 #各ファイルのビルド、テストの実行 if(DEBUG): sys.stderr.write(opts.yamlDir+"/*.yaml is loaded") #if(DEBUG): # sys.stderr.write(str(yamlFiles)) helper.initTap(testcases) 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)
(opts, args) = parser.parse_args() #os.umask(0o001) if (DEBUG): sys.stderr.write(str(opts)) ###-------parser_end------------- workingDir = opts.workspace ##yamlからの設定の読み込み testcases = 2 #各ファイルのビルド、テストの実行 if (DEBUG): sys.stderr.write(opts.yamlDir + "/*.yaml is loaded") #if(DEBUG): # sys.stderr.write(str(yamlFiles)) helper.initTap(testcases) 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)