From 6cb99e3ea911190e3b73adab3a92e75ef36731f1 Mon Sep 17 00:00:00 2001 From: Frank Duncan Date: Sun, 6 Aug 2017 21:02:15 -0500 Subject: [PATCH] Forever Buttons - Handle stop correctly --- .travis.yml | 4 ++-- bin/buildlinuxexec.sh | 2 +- bin/buildosxexec.sh | 2 +- bin/buildtravisexec.sh | 2 +- bin/buildwindowsexec.sh | 2 +- deps/common-lisp/clnl-gltk_0.1.tar.gz | Bin 7355 -> 0 bytes deps/common-lisp/clnl-gltk_0.2.tar.gz | Bin 0 -> 9682 bytes resources/UI-test.nlogo | 23 +++++++++++++++++++++++ src/main/model.lisp | 7 ++++++- src/test/main.lisp | 13 ++++++++++++- src/test/modeltests.lisp | 5 +++++ 11 files changed, 52 insertions(+), 8 deletions(-) delete mode 100644 deps/common-lisp/clnl-gltk_0.1.tar.gz create mode 100644 deps/common-lisp/clnl-gltk_0.2.tar.gz diff --git a/.travis.yml b/.travis.yml index 53ba83d..074107d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ addons: before_install: - export DISPLAY=:99.0 - /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x24 - - wget http://frank.kank.net/travissbcl/clnl/a66006d/$(git rev-parse HEAD)/travissbcl + - wget http://frank.kank.net/travissbcl/clnl/6e06e22/$(git rev-parse HEAD)/travissbcl - chmod +x travissbcl script: - - ./travissbcl --dynamic-space-size 3072 --script bin/all.lisp + - ./travissbcl --dynamic-space-size 4096 --script bin/all.lisp diff --git a/bin/buildlinuxexec.sh b/bin/buildlinuxexec.sh index c384097..327e32d 100755 --- a/bin/buildlinuxexec.sh +++ b/bin/buildlinuxexec.sh @@ -15,7 +15,7 @@ cwd=$PWD mkdir -p tmp/deps/ ( cd tmp/deps && - tar zxf ../../deps/common-lisp/clnl-gltk_0.1.tar.gz && + tar zxf ../../deps/common-lisp/clnl-gltk_0.2.tar.gz && tar zxf ../../deps/common-lisp/3b-cl-opengl-993d627.tar.gz && tar zxf ../../deps/common-lisp/alexandria-b1c6ee0.tar.gz && tar zxf ../../deps/common-lisp/babel_0.5.0.tar.gz && diff --git a/bin/buildosxexec.sh b/bin/buildosxexec.sh index 88a451d..17657ee 100755 --- a/bin/buildosxexec.sh +++ b/bin/buildosxexec.sh @@ -19,7 +19,7 @@ cwd=$PWD mkdir -p tmp/deps/ ( cd tmp/deps && - tar zxf ../../deps/common-lisp/clnl-gltk_0.1.tar.gz && + tar zxf ../../deps/common-lisp/clnl-gltk_0.2.tar.gz && tar zxf ../../deps/common-lisp/3b-cl-opengl-993d627.tar.gz && tar zxf ../../deps/common-lisp/alexandria-b1c6ee0.tar.gz && tar zxf ../../deps/common-lisp/babel_0.5.0.tar.gz && diff --git a/bin/buildtravisexec.sh b/bin/buildtravisexec.sh index cdf9076..8ca2bf7 100755 --- a/bin/buildtravisexec.sh +++ b/bin/buildtravisexec.sh @@ -25,7 +25,7 @@ mkdir -p tmp/deps/ tar zxf ../../deps/common-lisp/nibbles-v0.12.tar.gz && tar zxf ../../deps/common-lisp/trivial-features_0.8.tar.gz && tar zxf ../../deps/common-lisp/style-checker_0.1.tar.gz && - tar zxf ../../deps/common-lisp/clnl-gltk_0.1.tar.gz && + tar zxf ../../deps/common-lisp/clnl-gltk_0.2.tar.gz && tar zxf ../../deps/common-lisp/docgen_0.3.tar.gz && tar zxf ../../deps/common-lisp/ieee-floats-92e481a.tar.gz && tar zxf ../../deps/common-lisp/strictmath_0.1.tar.gz diff --git a/bin/buildwindowsexec.sh b/bin/buildwindowsexec.sh index 6f67f3f..6978071 100755 --- a/bin/buildwindowsexec.sh +++ b/bin/buildwindowsexec.sh @@ -21,7 +21,7 @@ fi mkdir -p tmp/deps/ ( cd tmp/deps && - tar zxf ../../deps/common-lisp/clnl-gltk_0.1.tar.gz && + tar zxf ../../deps/common-lisp/clnl-gltk_0.2.tar.gz && tar zxf ../../deps/common-lisp/3b-cl-opengl-993d627.tar.gz && tar zxf ../../deps/common-lisp/alexandria-b1c6ee0.tar.gz && tar zxf ../../deps/common-lisp/babel_0.5.0.tar.gz && diff --git a/deps/common-lisp/clnl-gltk_0.1.tar.gz b/deps/common-lisp/clnl-gltk_0.1.tar.gz deleted file mode 100644 index 1d75decca3d41ee27f835b220ba6a2e2fff3717f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7355 zcmZvgWl$6V*M$iQrKP2Nm+tNmSfmytrCU}Sq+{vs?h-*7S-L?wm6Gm;rJMbH-+%AS z_vg;sne*$;nS0JWG|`wyS#ytiNT?^GcCJhB>z^u3c+|_inW;4C+`Xa~ArdrE#Zg7g z5U;Iv&@71(wsNIRAhPu6GTvFuqdOihGy@d}p0Hg&m@KWXzP943!7%UIMkw@fSF`Gj zXq!_jz)<@vM} zH=k=*96uM*;E1j-=!T2?SCA$EWnMh?ZqJqgUY1Mz**5g9Q`U6T?F(Cd9(65jl;O^N ztzoI0koRuQd}GYTNDxg1a*V;gUf6~CKBuMAN^EsIqwYtGK9Jt z&v%%hih|%Is$`%sZYD-n;BOS4lR|fEwB) zfZ{KS?_)8p{UmC@P@Bb|f=!$#Ray(}$5;&H<|lY*m(!Os<^F`kg5K8!-_M>&N8VrD z)-O+^fFk+qajWw%a3#Yh z0tyH*&Hi4fypVeRwy(vNJzo6{SP#|@g}lbyEP`6djE$+b>@ z#OTiWiP+84?nlUlm>JC!PHmlHw=MJmdI+_v^b>v~Joq<)9H*c>*bT!w^td9&t%r^X zghY5{Fs9`BIt|la+ykmVB%ZHt)|@e3=NDRsSMbWT{LXdb)iTMC7(%*a(+w&n2PEq6 zv{%LiDNYkDele@Ja-F{>&)=W+?!GpOH&e`MP8iEOSwl`QCx&*2Q?K7>%3_YrkD-LG zgG2wuJkbV*eSO7#oUy&KbMh!;#4kLFru_<)OG+HEGw!~*>cI(GYro%uvz)d{K91vk zdW@GNap!(NRbYx^ufB|YTS>?NU8Y|9tNO8;IC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uaLbRdTbeB(*S;tdqN)(Gp{CUfh6s%4G$Vf z+qy;Ry*5!7v!S??%>yQ-nex!_Ut6tRh5l69YRq|4jR~lI6!I*yEp#SXsYy(})7W-a z?4?JE>M=^1)i!k0({V(zNr73K<~QBE0bY*prxH@PP~AoHCMuh+(NK}~LG=3 zM(FZaSFL1=tyRO7=sbQu2Ry(x79u+IJZlJT9OF_GyiFLwhgqC2VH<<$NPpCFkgQk1 zN)}&{5u+{s9jc{%*xPOv^F-X(JIto7++(_4^d(vv|2<|E#~>bCLcbXZ?QkdrnaK5bmd8ME;^QJESXt zEr*O=4u&aO)s{6D&H<8R*cXr_gJzPpZfuN#c!VZNIi?*|2L^@mz{1#0{#JRYx!bn~ zvQIhN)(iaP%;a+u>dxhtioiEM4wnA@>JK73sPgA)Vz2f8=g;>4wP*xhWRe6{fe5LH G2>%0W#R(h$ literal 0 HcmV?d00001 diff --git a/resources/UI-test.nlogo b/resources/UI-test.nlogo index 51bc137..5b08fe0 100644 --- a/resources/UI-test.nlogo +++ b/resources/UI-test.nlogo @@ -1,6 +1,12 @@ to go ask turtles [ fd 1 ] end + +to create-and-move + if 40 < count turtles [ stop ] + crt 1 + ask turtles [ fd 1 ] +end @#$#@#$#@ GRAPHICS-WINDOW 219 @@ -97,6 +103,23 @@ NIL NIL 1 +BUTTON +66 +276 +161 +309 +stopping +create-and-move +T +1 +T +OBSERVER +NIL +NIL +NIL +NIL +1 + @#$#@#$#@ ## WHAT IS IT? diff --git a/src/main/model.lisp b/src/main/model.lisp index 3e7c951..0ab8c10 100644 --- a/src/main/model.lisp +++ b/src/main/model.lisp @@ -308,7 +308,12 @@ DESCRIPTION: (loop :while (find button *enabled-forever-buttons* :test #'equal) ; The sleep is necessary so that it gives other threads time - :do (progn (clnl:run-commands (button-code button)) (sleep .001)))) + :do + (let + ((result (funcall *current-callback* (button-code button)))) + (when (eql :stop result) + (setf *enabled-forever-buttons* (remove button *enabled-forever-buttons* :test #'equal))) + (sleep .001)))) :name (format nil "Forever button: ~A" (button-display button)))) (t (funcall *current-callback* (button-code button))))))) diff --git a/src/test/main.lisp b/src/test/main.lisp index a62cd60..6d3282d 100644 --- a/src/test/main.lisp +++ b/src/test/main.lisp @@ -169,7 +169,15 @@ GRAPHICS-WINDOW~%210~%10~%649~%470~%-1~%-1~%13.0~%1~%10~%1~%1~%1~%0~%1~%1~%1~%-1 (defmacro defmodelreportertest (name model commands reporter value checksum) `(defmodeltest (format nil "Model Reporter - ~A" ,name) ,model ,commands ,reporter ,value ,checksum)) -(defmacro defmodelfiletest (name file commands checksum) +(defun wait-for-forever () + (loop + :while + (find-if + (lambda (name) (cl-ppcre:scan "Forever button:" name)) + (mapcar #'sb-thread:thread-name (sb-thread:list-all-threads))) + :do (sleep .1))) + +(defmacro defmodelfiletest (name file commands checksum &optional wait-for-forever) `(defsimpletest ,(format nil "File Model - ~A" name) (lambda () @@ -181,6 +189,7 @@ GRAPHICS-WINDOW~%210~%10~%649~%470~%-1~%-1~%13.0~%1~%10~%1~%1~%1~%0~%1~%1~%1~%-1 (declaim (sb-ext:muffle-conditions cl:warning)) (eval (clnl:model->single-form-lisp model :netlogo-callback (lambda (f) (setf callback f)))) (when ,(clnl-commands commands) (funcall callback ,(clnl-commands commands))) + ,(when wait-for-forever `(wait-for-forever)) (checksum= ,checksum (checksum-world))) (let* ((pkg (make-package (gensym))) @@ -195,6 +204,7 @@ GRAPHICS-WINDOW~%210~%10~%649~%470~%-1~%-1~%13.0~%1~%10~%1~%1~%1~%0~%1~%1~%1~%-1 (funcall (symbol-function (intern "BOOT-ME" pkg))) (when ,(clnl-commands commands) (funcall (symbol-function (intern "NETLOGO-CALLBACK" pkg)) ,(clnl-commands commands))) + ,(when wait-for-forever `(wait-for-forever)) (checksum= ,checksum (checksum-world)))))) (lambda () (let @@ -205,6 +215,7 @@ GRAPHICS-WINDOW~%210~%10~%649~%470~%-1~%-1~%13.0~%1~%10~%1~%1~%1~%0~%1~%1~%1~%-1 (with-open-file (str ,file) (clnl-model:read-from-nlogo str)) :netlogo-callback (lambda (f) (setf callback f)))) (when ,(clnl-commands commands) (funcall callback ,(clnl-commands commands))) + ,(when wait-for-forever `(wait-for-forever)) (format nil "~A~A" (clnl-nvm:export-world) (checksum-world)))) diff --git a/src/test/modeltests.lisp b/src/test/modeltests.lisp index 133827d..d80f871 100644 --- a/src/test/modeltests.lisp +++ b/src/test/modeltests.lisp @@ -139,6 +139,11 @@ end" (":button \"setup\" :button \"go\" 1" "crt 10 go ask turtles [ rt 90 ] go") "4E0128F172B4D0085186E49FDBD7014F6E365ED7") +(defmodelfiletest "UI 4" "resources/UI-test.nlogo" + (":button \"stopping\"" "repeat 80 [ create-and-move ]") + "749DC971517EDE9020BF125D0F362A978980272F" + t) + (defmodelfiletest "Wolf Sheep 1" "resources/models/Wolf Sheep Predation.nlogo" "setup go go go go go go go go go go go go go go" "9777CCF18935E52D8380C9C6DC02BFFBEE1F1149") -- 2.25.1