[mlpack-svn] [MLPACK] #362: better Boost test output

MLPACK Trac trac at coffeetalk-1.cc.gatech.edu
Sat Aug 16 15:33:07 EDT 2014


#362: better Boost test output
-------------------------+--------------------------------------------------
 Reporter:  rcurtin      |        Owner:                                            
     Type:  enhancement  |       Status:  new                                       
 Priority:  minor        |    Milestone:  mlpack 1.1.0                              
Component:  mlpack       |     Keywords:  mlpack_test, boost.test, output, log, test
 Blocking:               |   Blocked By:                                            
-------------------------+--------------------------------------------------
 [http://github.com/sumedhghaisas/libgdl/ libgdl] by Sumedh implements an
 interesting wrapper around the Boost Unit Test Framework which makes the
 testing infrastructure gives output like

 {{{
 Running 26 test cases...
 Starting test NormalParsingTest... [PASSED]
 Starting test MultipleArityErrorTest... [PASSED]
 Starting test StratifiedNegationTest... [PASSED]
 Starting test StratifiedRecursionTest... [PASSED]
 Starting test HeadSafetyTest... [PASSED]
 Starting test NotSafetyTest... [PASSED]
 Starting test OrBoundTest... [PASSED]
 Starting test BaseDependencyTest... [PASSED]
 Starting test InputDependencyTest... [PASSED]
 Starting test InitDependencyTest... [PASSED]
 Starting test LeaglDependencyTest... [PASSED]
 Starting test RoleUndefinedTest... [PASSED]
 Starting test LegalUndefinedTest... [PASSED]
 Starting test TerminalUndefinedTest... [PASSED]
 Starting test GoalUndefinedTest... [PASSED]
 Starting test NormalReasonerTest... [PASSED]
 Starting test QuestionTest... [PASSED]
 Starting test OrQuestionTest... [PASSED]
 Starting test NotQuestionTest... [PASSED]
 Starting test DistinctQuestionTest... [PASSED]
 Starting test RecursiveDependencyTest... [PASSED]
 Starting test EraseTest... [PASSED]
 Starting test Question1Test... [PASSED]
 Starting test Question2Test... [PASSED]
 Starting test CreateDSTest... [PASSED]
 Starting test LoadDSTest... [PASSED]
 *** No errors detected
 [100%] Built target test
 }}}

 This is done by the definition of a handful of useful macros in
 libgdl_test.hpp.  Sumedh and I think the same type of thing could be
 applied to the mlpack tests to clean up the output a lot, but there are a
 few intricacies:

  * It would be nice to not need to type MARK_START, MARK_PASSED, and all
 of the macro names into each test.  With how many tests are in mlpack this
 is somewhat unfeasible.  Maybe a MLPACK_AUTO_TEST_CASE macro should be
 defined that gives all of the relevant output.

  * The Log:: objects should have their output redirected to either stderr
 (probably not) or a file.  Otherwise the mlpack test output is drowned out
 by Log::Debug and Log::Warn messages.

  * The changes we make will have to be documented somewhere; it would
 probably be worth writing a quick tutorial so that users who are writing
 new tests for mlpack can understand the system we have set up.

 Another thing that will help here is when I can make the Jenkins matrix
 build test across different versions of Boost, so that we can know that
 whatever we do will work on older (and newer) versions of Boost.Test...

-- 
Ticket URL: <http://trac.research.cc.gatech.edu/fastlab/ticket/362>
MLPACK <www.fast-lab.org>
MLPACK is an intuitive, fast, and scalable C++ machine learning library developed at Georgia Tech.


More information about the mlpack-svn mailing list