From 1db12ca9d5f1ddb81e6722efdceb891ca70223cb Mon Sep 17 00:00:00 2001 From: Bruno Marre <bruno.marre@cea.fr> Date: Tue, 9 Aug 2022 11:24:59 +0200 Subject: [PATCH] gestion UnitTests --- Src/COLIBRI/col_solve.pl | 58 +++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/Src/COLIBRI/col_solve.pl b/Src/COLIBRI/col_solve.pl index 909ce6511..54779ce44 100644 --- a/Src/COLIBRI/col_solve.pl +++ b/Src/COLIBRI/col_solve.pl @@ -1672,36 +1672,38 @@ smt_unit_test(StrDir0,TO,CI) :- setval(bug,[smt_unknown:F|Bugs]) ; setval(bug,[F|Bugs])) ; pathname(F,PF,NF), - (Code == 3 -> - incval(nbTO), - (var(CI) -> - % on supprime le TO de UnitTests - concat_string(["UnitTests/",sat,"/",Logic,"/",NF], - SatTargetFile), - concat_string(["UnitTests/",unsat,"/",Logic,"/",NF], - UnsatTargetFile), - ((member(USFile,[SatTargetFile,UnsatTargetFile]), - exists(USFile)) - -> - concat_string(["rm ",USFile],Rm), - system(Rm)%, writeln(Rm) + (getval(make_UT,1)@eclipse -> + (Code == 3 -> + incval(nbTO), + (var(CI) -> + % on supprime le TO de UnitTests + concat_string(["UnitTests/",sat,"/",Logic,"/",NF], + SatTargetFile), + concat_string(["UnitTests/",unsat,"/",Logic,"/",NF], + UnsatTargetFile), + ((member(USFile,[SatTargetFile,UnsatTargetFile]), + exists(USFile)) + -> + concat_string(["rm ",USFile],Rm), + system(Rm)%, writeln(Rm) + ; true) ; true) - ; true) - ; (Code > 2 -> - true - ; (Code == 0 -> - concat_string(["UnitTests/unsat/",Logic,"/"],TargetDir) - ; % Code == 1 - concat_string(["UnitTests/sat/",Logic,"/"],TargetDir)), - (exists(TargetDir) -> - true - ; append_strings("mkdir ",TargetDir,Mkd), - system(Mkd)), - concat_string([TargetDir,NF],TargetFile), - (exists(TargetFile) -> + ; (Code > 2 -> true - ; concat_string(["cp ",F," ",TargetDir],Cp), - system(Cp))))), + ; (Code == 0 -> + concat_string(["UnitTests/unsat/",Logic,"/"],TargetDir) + ; % Code == 1 + concat_string(["UnitTests/sat/",Logic,"/"],TargetDir)), + (exists(TargetDir) -> + true + ; append_strings("mkdir ",TargetDir,Mkd), + system(Mkd)), + concat_string([TargetDir,NF],TargetFile), + (exists(TargetFile)-> + true + ; concat_string(["cp ",F," ",TargetDir],Cp), + system(Cp)))) + ; true)), garbage_collect, fail ; true), -- GitLab