if nproc <= 0: raise ValueError("number of processes must be a positive integer") elif nproc == 1: executable = 'bin/enzo-p' else: charm_args = os.environ.get('CHARM_ARGS') if charm_args is None: executable_template = 'charmrun +p{:d} bin/enzo-p' else: executable_template \ = ' '.join(['charmrun', charm_args, '+p{:d}', 'bin/enzo-p']) executable = executable_template.format(nproc) # this script can either be called from the base repository or from # the subdirectory: input/vlct prep_cur_dir('bin/enzo-p') # run the tests run_tests(executable) # analyze the tests tests_passed = analyze_tests() # cleanup the tests cleanup() if tests_passed: sys.exit(0) else: sys.exit(3)
dir_names = [ "method_vlct-1-x_rj2a_N256_0.2", "method_vlct-1-y_rj2a_N256_0.2", "method_vlct-1-z_rj2a_N256_0.2" ] for dir_name in dir_names: if os.path.isdir(dir_name): shutil.rmtree(dir_name) if __name__ == '__main__': executable = 'bin/enzo-p' # this script can either be called from the base repository or from # the subdirectory: input/vlct prep_cur_dir(executable) # run the tests run_tests(executable) # analyze the tests tests_passed = analyze_tests() # cleanup the tests cleanup() if tests_passed: sys.exit(0) else: sys.exit(3)
if nproc <= 0: raise ValueError("number of processes must be a positive integer") elif nproc == 1: executable = 'bin/enzo-e' else: charm_args = os.environ.get('CHARM_ARGS') if charm_args is None: executable_template = 'charmrun +p{:d} bin/enzo-e' else: executable_template \ = ' '.join(['charmrun', charm_args, '+p{:d}', 'bin/enzo-e']) executable = executable_template.format(nproc) # this script can either be called from the base repository or from # the subdirectory: input/vlct prep_cur_dir('bin/enzo-e') # run the tests run_tests(executable) # analyze the tests tests_passed = analyze_tests() # cleanup the tests cleanup() if tests_passed: sys.exit(0) else: sys.exit(3)