From 3715d838a6336181470e3795fcf070a20e253e28 Mon Sep 17 00:00:00 2001 From: Shunichi Nozawa Date: Mon, 4 Apr 2016 16:29:59 +0900 Subject: [PATCH] [irteus/test/unittest.l, .travis.yml] Enable unittest.l checking. Remove removing of failure (https://github.com/jsk-ros-pkg/jsk_roseus/pull/21#issuecomment-205101195) and add neglection of exitting. --- .travis.yml | 2 +- irteus/test/unittest.l | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 22a89821c..89928f777 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ script: # All commands must exit with code 0 on success. Anything else is consid - cd jskeus - make - source bashrc.eus - - find irteus/test -iname "*.l" | grep -v unittest.l | xargs -n1 irteusgl + - find irteus/test -iname "*.l" | xargs -n1 irteusgl # Test Homebrew formula - if [ "$TRAVIS_OS_NAME" == "osx" ]; then ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"; fi - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install homebrew/x11/jskeus --HEAD; fi diff --git a/irteus/test/unittest.l b/irteus/test/unittest.l index 71e7b1497..840bbe889 100644 --- a/irteus/test/unittest.l +++ b/irteus/test/unittest.l @@ -22,14 +22,18 @@ (warning-message 1 "*** This test fails intentinally ****~%") (dotimes (i 10) (assert nil "false") - ;; force remove trace from expected errored test - (setq ((car (*unit-test* . result)) . failures) nil) ) (dotimes (i 10) (assert t "ok")) ) +;; Prevent from exitting from run-all-tests because we intentinally raise failure of unitteset. +(setf (symbol-function 'org-exit) (symbol-function 'exit)) +(setf (symbol-function 'exit) #'(lambda (a) (print a))) +;; Test all cases including intentinal failure. (run-all-tests) +;; Revert exit function +(setf (symbol-function 'exit) (symbol-function 'org-exit)) (setq ret -1) (format t "functions = ~A, num-tests =~A, num-failures = ~A, num-successes = ~A~%"