logicmoo / Logicmoo_docker

Docker Master Container that starts the rest of the Logicmoo services (see https://hub.docker.com/repository/docker/logicmoo/logicmoo_starter_image )
GNU Lesser General Public License v2.1
4 stars 0 forks source link

logicmoo.pfc.test.sanity_base.HYBRID_02 JUnit #239

Open TeamSPoon opened 3 years ago

TeamSPoon commented 3 years ago

(cd /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/pfc/t/sanity_base ; swipl -x /var/lib/jenkins/workspace/logicmoo_workspace@2/bin/lmoo-clif hybrid_02.pfc)

ISSUE: https://github.com/logicmoo/logicmoo_workspace/issues/490 EDIT: https://github.com/logicmoo/logicmoo_workspace/edit/master/packs_sys/pfc/t/sanity_base/hybrid_02.pfc JENKINS: https://jenkins.logicmoo.org/job/logicmoo_workspace/lastBuild/testReport/logicmoo.pfc.test.sanity_base/HYBRID_02/logicmoo_pfc_test_sanity_base_HYBRID_02_JUnit/ ISSUE_SEARCH: https://github.com/logicmoo/logicmoo_workspace/issues?q=is%3Aissue+label%3AHYBRID_02

%~ init_phase(after_load)
%~ init_phase(restore_state)
%
running('/var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/pfc/t/sanity_base/hybrid_02.pfc'),
%~ this_test_might_need( :-( use_module( library(logicmoo_plarkc))))

:- dynamic(total_income/3).

% RULES

% RULES
income(Person,_Source,Year,Dollars) ==> {increment_income(Person,Year,Dollars)}.

==> do_and_undo(increment_income(P,Y,D),decrement_income(P,Y,D)).

increment_income(P,Y,D) :-
  (retract(total_income(P,Y,Old)) -> New is Old+D ; New = D),
  assert(total_income(P,Y,New)).

decrement_income(P,Y,D) :-
  retract(total_income(P,Y,Old)),
  New is Old-D,
  assert(total_income(P,Y,New)).

% FACTS

% FACTS
income(person,sourceOne,2035,6666).

income(person,sourceTwo,2035,1111).

income(person,sourceTwo,2036,2222).

% RESULTS PT 1

% RESULTS PT 1
:- listing(total_income/3).
%~ skipped( listing( total_income/3))

/*

total_income(person, 2035, 7777).
total_income(person, 2036, 2222).

*/

% UPDATE Remove some income
\+ income(person,_,2035,1111).

% RESULTS PT 2
%~ debugm( baseKB,
%~   show_success( baseKB,
%~     baseKB : mpred_withdraw( income(person,sourceTwo,2035,1111),
%~                ( mfl4(BaseKB,baseKB,'* https://logicmoo.org:2082/gitlab/logicmoo/logicmoo_workspace/-/blob/master@2/packs_sys/pfc/t/sanity_base/hybrid_02.pfc ',48) ,
%~                  ax))))

% RESULTS PT 2
:- listing(total_income/3).
%~ skipped( listing( total_income/3))
%~ /var/lib/jenkins/workspace/logicmoo_workspace@2/packs_sys/pfc/t/sanity_base/hybrid_02.pfc:61 
%~ unused(no_junit_results)

%~ test_completed_exit(0)

totalTime=1.000

FAILED: /var/lib/jenkins/workspace/logicmoo_workspace@2/bin/lmoo-junit-minor -k hybrid_02.pfc (returned 0) Add_LABELS='' Rem_LABELS='Skipped,Skipped,Errors,Warnings,Overtime,Skipped,Skipped'