diff --git a/irteus/test/all-robots-objects.l b/irteus/test/all-robots-objects.l index 3a4ac7f89..9776868ad 100644 --- a/irteus/test/all-robots-objects.l +++ b/irteus/test/all-robots-objects.l @@ -26,5 +26,6 @@ '("robots" "objects" "scenes") '(make-all-robots make-all-objects make-all-scenes)) -(run-all-tests) -(exit) +(eval-when (load eval) + (run-all-tests) + (exit)) diff --git a/irteus/test/coords.l b/irteus/test/coords.l index 62d1ab1ee..179c4a558 100644 --- a/irteus/test/coords.l +++ b/irteus/test/coords.l @@ -19,5 +19,7 @@ (format *error-output* "~A gc:~A, vmrss:~A -> ~A~%" j (sys::gc) vmrss-orig vmrss) (assert (< vmrss (* 2 vmrss-orig)) "make-coords quaternion2matrix"))) -(run-all-tests) -(exit) + +(eval-when (load eval) + (run-all-tests) + (exit)) diff --git a/irteus/test/geo.l b/irteus/test/geo.l index 2f285ea71..b24b8aa1b 100644 --- a/irteus/test/geo.l +++ b/irteus/test/geo.l @@ -79,6 +79,7 @@ -0.2)) ) -(run-all-tests) -(exit) +(eval-when (load eval) + (run-all-tests) + (exit)) diff --git a/irteus/test/graph.l b/irteus/test/graph.l index 57b06dc19..8dab1c3d7 100644 --- a/irteus/test/graph.l +++ b/irteus/test/graph.l @@ -33,12 +33,16 @@ "(send directed-graph :clear-nodes) success") )) - +(defclass costed-node + :super node) +(defmethod costed-node + (:cost () 0)) (deftest test-graph () - (defmethod node - (:cost () 0)) + ;; re-define method within defun is not working with compile + ;; (defmethod node + ;; (:cost () 0)) (let ((gr (instance graph :init)) ar - (a (instance node :init 'a)) (b (instance node :init 'b))) + (a (instance costed-node :init 'a)) (b (instance costed-node :init 'b))) (send gr :add-node a) (send gr :add-node b) (setq ar (send gr :add-arc-from-to a b)) @@ -119,6 +123,6 @@ )) -(run-all-tests) - -(exit) +(eval-when (load eval) + (run-all-tests) + (exit)) diff --git a/irteus/test/interpolator.l b/irteus/test/interpolator.l index 7eddc58ac..89e15f259 100644 --- a/irteus/test/interpolator.l +++ b/irteus/test/interpolator.l @@ -127,5 +127,6 @@ (print (length r2)) |# -(run-all-tests) -(exit) +(eval-when (load eval) + (run-all-tests) + (exit)) diff --git a/irteus/test/irteus-demo.l b/irteus/test/irteus-demo.l index 421d91870..cc97aac70 100644 --- a/irteus/test/irteus-demo.l +++ b/irteus/test/irteus-demo.l @@ -146,5 +146,6 @@ (assert (look-at-ik-all))) -(run-all-tests) -(exit) +(eval-when (load eval) + (run-all-tests) + (exit)) diff --git a/irteus/test/joint.l b/irteus/test/joint.l index 1ee2f40d2..72ca22b42 100644 --- a/irteus/test/joint.l +++ b/irteus/test/joint.l @@ -289,5 +289,6 @@ (deftest test-make-joint-min-max-table-margin-5deg (assert (test-make-joint-min-max-table-common :margin 5))) -(run-all-tests) -(exit) +(eval-when (load eval) + (run-all-tests) + (exit)) diff --git a/irteus/test/mathtest.l b/irteus/test/mathtest.l index ea1294063..7a42694e2 100644 --- a/irteus/test/mathtest.l +++ b/irteus/test/mathtest.l @@ -87,5 +87,6 @@ (assert (eps-matrix= (m* m6 vec) (m* vec (diagonal val))) "ql-decompose") )) -(run-all-tests) -(exit) +(eval-when (load eval) + (run-all-tests) + (exit)) diff --git a/irteus/test/matrix.l b/irteus/test/matrix.l index c5e82b2d6..ad47c743b 100644 --- a/irteus/test/matrix.l +++ b/irteus/test/matrix.l @@ -139,5 +139,6 @@ (apply #'concatenate-matrix-column-naive-impl mats)))) )) -(run-all-tests) -(exit) +(eval-when (load eval) + (run-all-tests) + (exit)) diff --git a/irteus/test/read-img.l b/irteus/test/read-img.l index 6cf8e2328..655640f59 100644 --- a/irteus/test/read-img.l +++ b/irteus/test/read-img.l @@ -34,6 +34,7 @@ )) )) -(run-all-tests) -(exit) +(eval-when (load eval) + (run-all-tests) + (exit)) diff --git a/irteus/test/rendering.l b/irteus/test/rendering.l index d1fd25d07..6f062824c 100644 --- a/irteus/test/rendering.l +++ b/irteus/test/rendering.l @@ -20,6 +20,7 @@ "image transposed twice must be the same as original image") ) -(run-all-tests) -(exit) +(eval-when (load eval) + (run-all-tests) + (exit)) diff --git a/irteus/test/robot-model-usage.l b/irteus/test/robot-model-usage.l index a9643b8b7..d021baa6b 100644 --- a/irteus/test/robot-model-usage.l +++ b/irteus/test/robot-model-usage.l @@ -167,5 +167,6 @@ )) -(run-all-tests) -(exit) +(eval-when (load eval) + (run-all-tests) + (exit)) diff --git a/irteus/test/test-irt-motion.l b/irteus/test/test-irt-motion.l index 743f71e27..3bbe9d69a 100644 --- a/irteus/test/test-irt-motion.l +++ b/irteus/test/test-irt-motion.l @@ -922,6 +922,7 @@ (assert (every #'identity (mapcar #'(lambda (dc) (test-load-ik-debug-information-log-common dc)) '(t :always :always-with-debug-log nil))))) +(eval-when (eval) ;; redefine method within class is not run for compiled code) (deftest test-all-for-arm-robot-static-1 (assert (test-all-for-sample-multidof-arm-robot :static-p t :fix-pos #f(0 0 0)))) @@ -934,6 +935,7 @@ (deftest test-all-for-sample-robot-static-2 (assert (test-all-for-sample-robot :static-p t :fix-pos #f(100 200 300)))) +) (deftest test-self-collision-check-IK-test (assert @@ -1135,6 +1137,7 @@ ) ;; Check :cog-translation-axis dimension bug +(eval-when (eval) ;; redefine method within class is not run for compiled code) (deftest test-cog-translation-axis-dim (unwind-protect (progn @@ -1175,6 +1178,8 @@ (dif-pos dif-rot &rest args &key ik-args &allow-other-keys) (send* self :inverse-kinematics-loop-org dif-pos dif-rot :ik-args ik-args args))) )) +) -(run-all-tests) -(exit 0) +(eval-when (load eval) + (run-all-tests) + (exit 0)) diff --git a/irteus/test/test-pointcloud.l b/irteus/test/test-pointcloud.l index f810ab1a7..aa48e375d 100644 --- a/irteus/test/test-pointcloud.l +++ b/irteus/test/test-pointcloud.l @@ -294,5 +294,6 @@ (move-origin-to-check) ) -(run-all-tests) -(exit) +(eval-when (load eval) + (run-all-tests) + (exit)) diff --git a/irteus/test/transparent.l b/irteus/test/transparent.l index 67d97d167..a819e3cc9 100644 --- a/irteus/test/transparent.l +++ b/irteus/test/transparent.l @@ -33,5 +33,6 @@ (assert (< vmrss (* 4 vmrss-orig)) "check memory leak") ))) -(run-all-tests) -(exit) +(eval-when (load eval) + (run-all-tests) + (exit))