Commit 253974e6 authored by myron's avatar myron
Browse files

cleaning test results

parent 38f118ff
......@@ -7,6 +7,7 @@ variables:
LOCAL_REPO: "/dev/shm/gitlab_ci/xrstools"
VENV_DIR: /dev/shm/gitlab_ci/xrstools/venv
USE_CLEAN_VENV: "true"
CLEAN_RESULTS: "true"
test:
stage: test
......
......@@ -33,3 +33,9 @@ ref_stack = h5py.File("/data/scisofttmp/mirone/raffaela/volumes_all_energies_ref
assert (np.abs( ref_stack- stack ).max()<1.0 ) , "difference between stack and reference stack too big"
save_path="results"
if os.environ["CLEAN_RESULTS"] == "true" :
os.system("rm %s/*" % save_path)
......@@ -51,3 +51,5 @@ ref = np.loadtxt( "results/spectra_ref.txt")
assert( abs(ref-results).max( )< 1.0e-7)
if os.environ["CLEAN_RESULTS"] == "true" :
os.system("rm results/*")
......@@ -279,3 +279,6 @@ lw_ex.removeCorePearsonAv('O','K',[52.0,534.0],[570.0,600.0],weights=[2,1], gues
lw_ex.save_average_Sqw(save_path+'/h2o_pixel_hq.dat', emin=0.0, emax=600.0, normrange=[520.0,600.0])
check_results( os.path.join(save_path,'h2o_pixel_hq.dat') , os.path.join(save_path,"h2o_pixel_hq_ref.dat") )
if os.environ["CLEAN_RESULTS"] == "true" :
os.system("rm %s/*" % save_path)
......@@ -22,6 +22,8 @@ import XRStools.roiSelectionWidget
XRStools.roiSelectionWidget.SKIP_WARNING = True
save_path="results_non_reg_testing_XRS_raman_extraction"
def tosavepath( filename) :
return os.path.join("results_non_reg_testing_XRS_raman_extraction",filename )
......@@ -385,3 +387,5 @@ check_results(tosavepath("non_reg_output_gui_raman_mediumq.txt"),tosavepath("non
check_results(tosavepath("non_reg_output_gui_raman_highq.txt"),tosavepath("non_reg_output_gui_raman_reference_highq.txt"))
print(" OK " )
if os.environ["CLEAN_RESULTS"] == "true" :
os.system("rm %s/*" % save_path)
......@@ -281,3 +281,6 @@ lw_ex.removeCorePearsonAv('O','K',[52.0,534.0],[570.0,600.0],weights=[2,1], gues
lw_ex.save_average_Sqw(save_path+'/h2o_pixel_hq_small.dat', emin=0.0, emax=600.0, normrange=[520.0,600.0])
check_results( os.path.join(save_path,'h2o_pixel_hq_small.dat') , os.path.join(save_path,"h2o_pixel_hq_small.dat.ref") )
if os.environ["CLEAN_RESULTS"] == "true" :
os.system("rm %s/*" % save_path)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment