Changeset 2272


Ignore:
Timestamp:
12/08/21 11:42:24 (3 years ago)
Author:
jderouillat
Message:

Introduce different levels of test in test suite, levels can be set in function of the machine, arch and mode.

Location:
XIOS/dev/dev_ym/XIOS_COUPLING/xios_test_suite/TEST_SUITE
Files:
12 added
6 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_ym/XIOS_COUPLING/xios_test_suite/TEST_SUITE/run_test

    r2210 r2272  
    9898    do 
    9999      mkdir -p ${rundir}/def_files/${svnR}/${i%%} ; CHMOD ${rundir}/def_files/${svnR}/${i%%} 
    100       cp ${i%%}/user_param.json ${rundir}/def_files/${svnR}/${i%%} 
     100      cp ${i%%}/user_param_*.json ${rundir}/def_files/${svnR}/${i%%} 
    101101      for j in $(ls -d ${i%%/}/CONFIG_*) 
    102102      do 
  • XIOS/dev/dev_ym/XIOS_COUPLING/xios_test_suite/TEST_SUITE/step1.py

    r2211 r2272  
    2323def OSinfo(runthis): 
    2424    red = lambda text: '\033[0;31m' + text + '\033[0m' 
    25     osstdout = subprocess.Popen(runthis, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, close_fds=True) 
    26     theInfo = osstdout.communicate()[0].strip() 
    27     if osstdout.returncode!=0: 
     25    osstdout = subprocess.Popen(runthis, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True) 
     26    theInfo, theErr = osstdout.communicate() 
     27    #print( theInfo ) 
     28    if theErr: 
    2829        print(red(runthis+" FAILED")) 
    29         print(theInfo) 
     30        print(theErr) 
    3031        sys.exit() 
    3132 
     
    4445    def_param=dict(l) 
    4546    return def_param 
     47 
     48def get_test_type(): 
     49    test_type = "basic" 
     50    if ( machine == "irene" ): 
     51        test_type = "advanced" 
     52    return test_type 
    4653 
    4754def generate_job(fn, n): 
     
    165172    #print(default_param) 
    166173 
     174    # default = basic, function( machine, arch, mode ) 
     175    test_type = get_test_type() 
     176 
    167177    for test_folder in test_folder_list: 
    168178        config_list=[] 
    169179        config_name=[] 
    170         with open(test_folder+"/user_param.json", "r") as f: 
     180        with open(test_folder+"/user_param_"+test_type+".json", "r") as f: 
    171181            config_dict = json.load(f) 
    172182 
Note: See TracChangeset for help on using the changeset viewer.