MCPcopy Create free account
hub / github.com/RenderKit/embree / run

Function run

scripts/test.py:434–476  ·  view source on GitHub ↗
(mode)

Source from the content-addressed store, hash-verified

432
433# builds or runs tests for specified host machine
434def run(mode):
435
436 [ctest_env, ctest_suffix, cmake_build_suffix, threads] = pickle.load(open(".ctest_conf", "rb"))
437
438 # pick sde executable
439 # don't use sde if no sde cpuid is specified
440 sde_cmd = ""
441 if mode == "test" and "sde" in g_config:
442 if OS == "linux":
443 sde_cmd = os.path.sep.join([NAS, 'sde', 'lin', 'sde64'])
444 elif OS == "macosx":
445 sde_cmd = os.path.sep.join([NAS, 'sde', 'mac', 'sde64'])
446 elif OS == "windows":
447 sde_cmd = os.path.sep.join([NAS, 'sde', 'win', 'sde64'])
448 else:
449 sys.stderr.write("unknown operating system "+OS)
450 sys.exit(1)
451
452 sde_cmd = sde_cmd + " -" + g_config['sde'] + " -- "
453
454 if mode == "test" or mode == "build":
455 cmd = ctest_env + sde_cmd + "ctest -VV -S "+ os.path.join("scripts","test.cmake -DSTAGE="+mode+" -DTHREADS="+threads+" -DBUILD_SUFFIX=\""+cmake_build_suffix+"\"") + ctest_suffix
456 else:
457 cmd = ctest_env + os.path.join("scripts",mode)
458
459 if mode == "env":
460 cmd = ctest_env + "echo env";
461
462 if mode == "test" and not OS == "windows":
463 fix_cmake_paths()
464
465 # execute step
466 if (g_debugMode):
467 print(cmd)
468 else:
469 try:
470 if OS == "windows":
471 subprocess.check_call(cmd, stderr=subprocess.STDOUT, shell=True)
472 else:
473 subprocess.check_call(cmd, stderr=subprocess.STDOUT, shell=True, executable='/bin/bash')
474 except subprocess.CalledProcessError as e:
475 sys.stderr.write("windows test invocation failed with return code "+str(e.returncode))
476 sys.exit(1)
477
478g_config = {}
479def parseCommandLine(argv):

Callers 4

test.pyFile · 0.85
executeMethod · 0.85
mainMethod · 0.85
runMethod · 0.85

Calls 3

fix_cmake_pathsFunction · 0.85
joinMethod · 0.80
loadMethod · 0.45

Tested by

no test coverage detected