Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions irteus/test/unittest.l
Original file line number Diff line number Diff line change
Expand Up @@ -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~%"
Expand Down