:- style_check(-singleton). :- style_check(-discontiguous). :- was_style_check(-atom). :- was_style_check(-string). :-include('sigma_header.pl'). :-'ROOT_RT'(X),concat_atom([X,'/inference_test/'],O),assert(tq_input_dir(O)). % ========================================================= % Run A Single TQ % ========================================================= parse_sigma_ua_tq(Options):- retractAllProlog(last_tq(_)),assert(last_tq('TES')), memberchk(cmd='runtest',Options),!,make, setSigmaOption(opt_ctx_assert='ToplevelContext'), setSigmaOption(opt_kb='Merge'), getSigmaOption(asid=_,AID), getSigmaOption(user='Web',User), getSigmaOption(interp='kif',Interp), getSigmaOption(filename='axioms.tq',FileName), testTQFileWriteHTML(FileName,User,TimeRequired,Result,Title,Mods). % =========================================================== % Run TQ Entire Directory "Sub" using "KB" and "Ctx" then Send the Output to Stream "Dest" % =========================================================== parse_sigma_ua_tq(Options):-memberchk(submit='Run TQs',Options),!,make, setSigmaOption(opt_ctx_assert='ToplevelContext'), setSigmaOption(opt_kb='Merge'), getSigmaOption(asid=_,AID), getSigmaOption(user='Web',User), getSigmaOption(interp='kif',Interp), getSigmaOption(tqDir='soundness',TQDIR), sigmaThreadCreate(ThreadName,run_tq_thread(TQDIR),Id,[]),!, parse_sigma_ua_tq([client='tqsystem']). % =========================================================== % Show a TEST DIRECTORY % =========================================================== parse_sigma_ua_tq(Options):-memberchk(cmd='tqpage',Options),!,make, setSigmaOption(opt_ctx_assert='ToplevelContext'), setSigmaOption(opt_kb='Merge'), getSigmaOption(asid=_,AID), getSigmaOption(user='Web',User), getSigmaOption(interp='kif',Interp), getSigmaOption(tqDir='soundness',TQDIR), logOnFailure(test_prep_dir(TQDIR,TQOutputDir)), logOnFailure(concat_atom([TQOutputDir,'*.tq'],MASK)), logOnFailure(expand_file_name(MASK,TQS)),!, writeFmt('',[]), writeFmt('',[]), logOnFailure(write_file_list(TQDIR,TQS,TQOutputDir)), writeFmt('
View Test SourceRun TestView Test SourceRun Test
',[]). % ==================================================== % Show main TQ Front page (fallback) % ==================================================== parse_sigma_ua_tq(Options):- setSigmaOption(opt_ctx_assert='ToplevelContext'), setSigmaOption(opt_kb='Merge'), getSigmaOption(asid=_,AID), getSigmaOption(user='Web',User), getSigmaOption(interp='kif',Interp), getSigmaOption(tqDir='soundness',TQDIR), expand_file_name('../../inference_test/*', Absolute), writeFmt('',[]), show_available_tqs2(Absolute,Paths), links_to_available_tqs(Paths), writeFmt('
',[]). % =================================================================== % TQ BATCH INTERFACE % =================================================================== % This file runs the automated test suite over the infernece questions run_batch(Sub):- (unsetSigmaOption(client=html)), global_set('Tests Failed',0), global_set('Tests Passed',0), global_set('Tests Run',0), global_set('Tests Skipped',0), global_set('Tests Incomplete',0), test_prep_dir(Sub,OutputDir), concat_atom([OutputDir,'index.html'],TestSummary),!, atom_concat(OutputDir,'*.tq',MASK), expand_file_name(MASK,TQS),!, Version='Byrd', getCputime(Start), safe_file_open(TestSummary,'w',Dest), writeFmt(Dest,'\n