jsk-ros-pkg / jsk_control

jsk control ros packages
http://github.com/jsk-ros-pkg/jsk_control
13 stars 51 forks source link

Fix and add test of loading euslisp files #704

Closed mmurooka closed 5 years ago

mmurooka commented 5 years ago

Add test to find error of https://github.com/jsk-ros-pkg/jsk_control/pull/703 . This pr contains https://github.com/jsk-ros-pkg/jsk_control/pull/703 's fix.

Test working correctly in my forked repository.

  1. just add test: https://github.com/jsk-ros-pkg/jsk_control/commit/7832f1b929dbbd4afb1144e6669380920c15365f https://travis-ci.org/mmurooka/jsk_control/builds/493237231 test failed as expected
    
    [eus_qp:make] m;; loading roseus("1.7.4") on euslisp((9.26 ip-172-30-1-221 Mon Dec 17 09:30:19 PST 2018  1.2.1))
    [eus_qp:make] mCall Stack (max depth: 20):
    [eus_qp:make]   0: at (apply #'ros::load-org-for-ros ros::fullname args)
    [eus_qp:make]   1: at (apply #'ros::load-org-for-ros ros::fullname args)
    [eus_qp:make]   2: at (let ((ros::fullname fname)) (when (substringp "package://" fname) (setq ros::fullname (ros::resolve-ros-path fname)) (when ros::*compile-message* (let* ((ros::urlname (url-pathname fname)) (package-name (send ros::urlname :host)) (ros::path-name (format nil "~A_~A" package-name (substitute 95 47 (concatenate string (subseq (send ros::urlname :directory-string) 1) (send ros::urlname :name))))) (ros::old-module (find ros::path-name *loaded-modules* :key #'lisp::load-module-file-name :test #'equal))) (unless ros::old-module (let* ((ros::ppath (unix:getenv "CMAKE_PREFIX_PATH")) (dir (format nil "~A/share/roseus/ros/~A" (subseq ros::ppath 0 (position 58 ros::ppath)) package-name))) (unless (probe-file dir) (unix:mkdir dir)) (compiler:compile-file-if-src-newer ros::fullname (format nil "~A/~A" dir ros::path-name)) (return-from load (load (format nil "~A/~A.so" dir ros::path-name) :entry (format nil "___~A" ros::path-name)))))))) (if (null ros::fullname) (error "file ~s not found" fname)) (apply #'ros::load-org-for-ros ros::fullname args))
    [eus_qp:make]   3: at (load "../trajectory-configuration-task.l")
    [eus_qp:make]   4: at (apply #'ros::load-org-for-ros ros::fullname args)
    [eus_qp:make]   5: at (apply #'ros::load-org-for-ros ros::fullname args)
    [eus_qp:make]   6: at (let ((ros::fullname fname)) (when (substringp "package://" fname) (setq ros::fullname (ros::resolve-ros-path fname)) (when ros::*compile-message* (let* ((ros::urlname (url-pathname fname)) (package-name (send ros::urlname :host)) (ros::path-name (format nil "~A_~A" package-name (substitute 95 47 (concatenate string (subseq (send ros::urlname :directory-string) 1) (send ros::urlname :name))))) (ros::old-module (find ros::path-name *loaded-modules* :key #'lisp::load-module-file-name :test #'equal))) (unless ros::old-module (let* ((ros::ppath (unix:getenv "CMAKE_PREFIX_PATH")) (dir (format nil "~A/share/roseus/ros/~A" (subseq ros::ppath 0 (position 58 ros::ppath)) package-name))) (unless (probe-file dir) (unix:mkdir dir)) (compiler:compile-file-if-src-newer ros::fullname (format nil "~A/~A" dir ros::path-name)) (return-from load (load (format nil "~A/~A.so" dir ros::path-name) :entry (format nil "___~A" ros::path-name)))))))) (if (null ros::fullname) (error "file ~s not found" fname)) (apply #'ros::load-org-for-ros ros::fullname args))
    [eus_qp:make]   7: at (load "./inverse-kinematics-wrapper.l")
    [eus_qp:make]   8: at (apply #'ros::load-org-for-ros ros::fullname args)
    [eus_qp:make]   9: at (apply #'ros::load-org-for-ros ros::fullname args)
    [eus_qp:make]   10: at (let ((ros::fullname fname)) (when (substringp "package://" fname) (setq ros::fullname (ros::resolve-ros-path fname)) (when ros::*compile-message* (let* ((ros::urlname (url-pathname fname)) (package-name (send ros::urlname :host)) (ros::path-name (format nil "~A_~A" package-name (substitute 95 47 (concatenate string (subseq (send ros::urlname :directory-string) 1) (send ros::urlname :name))))) (ros::old-module (find ros::path-name *loaded-modules* :key #'lisp::load-module-file-name :test #'equal))) (unless ros::old-module (let* ((ros::ppath (unix:getenv "CMAKE_PREFIX_PATH")) (dir (format nil "~A/share/roseus/ros/~A" (subseq ros::ppath 0 (position 58 ros::ppath)) package-name))) (unless (probe-file dir) (unix:mkdir dir)) (compiler:compile-file-if-src-newer ros::fullname (format nil "~A/~A" dir ros::path-name)) (return-from load (load (format nil "~A/~A.so" dir ros::path-name) :entry (format nil "___~A" ros::path-name)))))))) (if (null ros::fullname) (error "file ~s not found" fname)) (apply #'ros::load-org-for-ros ros::fullname args))
    [eus_qp:make]   11: at (load "inverse-kinematics-statics-wrapper.l")
    [eus_qp:make]   12: at (progn (load "inverse-kinematics-statics-wrapper.l") (exit))
    [eus_qp:make] /opt/ros/indigo/share/euslisp/jskeus/eus/Linux64/bin/irteusgl: ERROR th=0  0x57c4620 in (apply #'ros::load-org-for-ros ros::fullname args)m[ERROR] test (= (unix:system (ros::resolve-ros-path package://eus_qp/optmotiongen/test/test-load-euslisp-files.bash)) 0) failed ... ( ^[0mmstart testing [test-load-euslisp-files]
    [eus_qp:make] l/build/eus_qp/test_results/eus_qp/rosunit-load-optmotiongen-euslisp-files.xml
    [eus_qp:make] ).m
    [eus_qp:make] mmake[3]: Leaving directory `/home/travis/ros/ws_jsk_control/build/eus_qp'
    [eus_qp:make] /usr/bin/make -f CMakeFiles/_run_tests_eus_qp_rostest_optmotiongen_test_test-load-euslisp-files.test.dir/build.make CMakeFiles/_run_tests_eus_qp_rostest_optmotiongen_test_test-load-euslisp-files.test.dir/build
    [eus_qp:make] make[3]: Entering directory `/home/travis/ros/ws_jsk_control/build/eus_qp'
    [eus_qp:make] catkin_generated/env_cached.sh /usr/bin/python /opt/ros/indigo/share/catkin/cmake/test/run_tests.py /home/travis/ros/ws_jsk_control/build/eus_qp/test_results/eus_qp/rostest-optmotiongen_test_test-load-euslisp-files.xml /opt/ros/indigo/share/rostest/cmake/../../../bin/rostest\ --pkgdir=/home/travis/ros/ws_jsk_control/src/jsk_control/eus_qp\ --package=eus_qp\ --results-filename\ optmotiongen_test_test-load-euslisp-files.xml\ --results-base-dir\ "/home/travis/ros/ws_jsk_control/build/eus_qp/test_results"\ /home/travis/ros/ws_jsk_control/src/jsk_control/eus_qp/optmotiongen/test/test-load-euslisp-files.test\
    [eus_qp:make] -- run_tests.py: execute commands
    [eus_qp:make]   /opt/ros/indigo/share/rostest/cmake/../../../bin/rostest --pkgdir=/home/travis/ros/ws_jsk_control/src/jsk_control/eus_qp --package=eus_qp --results-filename optmotiongen_test_test-load-euslisp-files.xml --results-base-dir /home/travis/ros/ws_jsk_control/build/eus_qp/test_results /home/travis/ros/ws_jsk_control/src/jsk_control/eus_qp/optmotiongen/test/test-load-euslisp-files.test
    [eus_qp:make] ... logging to /home/travis/.ros/log/rostest-e41c61aff280-21609.log
    [eus_qp:make] [ROSUNIT] Outputting test results to /home/travis/ros/ws_jsk_control/build/eus_qp/test_results/eus_qp/rostest-optmotiongen_test_test-load-euslisp-files.xml
    [eus_qp:make] testload-optmotiongen-euslisp-files ... ERROR!
    [eus_qp:make] ERROR: max time [1000.0s] allotted for test [load-optmotiongen-euslisp-files] of type [eus_qp/test-load-euslisp-files.l]

...

[eus_qp:make] [ROSTEST]----------------------------------------------------------------------- [eus_qp:make] [eus_qp:make] [eus_qp:make] SUMMARY [eus_qp:make] m RESULT: FAILm [eus_qp:make] TESTS: 0 [eus_qp:make] m ERRORS: 1m [eus_qp:make] FAILURES: 0 [eus_qp:make]


2. fix loading path: https://github.com/jsk-ros-pkg/jsk_control/commit/586f2461f8f79e172d4ddb232962068f5b5db581
https://travis-ci.org/mmurooka/jsk_control/builds/493258278
test passed
mmurooka commented 5 years ago

Travis test passed and ready to merge. Could you merge or give some advice?