nickgillian / grt

gesture recognition toolkit
859 stars 285 forks source link

Dev branch tests fail #103

Open kimjune01 opened 7 years ago

kimjune01 commented 7 years ago

After building:

cd build
mkdir tmp 
cd tmp
cmake ..
make -j4 
make test

I encounter test failures in ClassifierTest and MLPRegressionTest. This causes the tutorials (HelloWorldExample, GettingStarted) to fail at runtime with error

setClassifier(const Classifier classifier) - Classifier Module Not Set!
Running tests...
Test project /Users/june/Documents/Kinect/grt/build/tmp
      Start  1: ANBCTest
 1/26 Test  #1: ANBCTest .........................   Passed    0.07 sec
      Start  2: AdaBoostTest
 2/26 Test  #2: AdaBoostTest .....................   Passed    0.51 sec
      Start  3: BAGTest
 3/26 Test  #3: BAGTest ..........................   Passed    0.02 sec
      Start  4: DTWTest
 4/26 Test  #4: DTWTest ..........................   Passed    0.02 sec
      Start  5: DecisionTreeTest
 5/26 Test  #5: DecisionTreeTest .................   Passed    0.09 sec
      Start  6: FiniteStateMachineTest
 6/26 Test  #6: FiniteStateMachineTest ...........   Passed    0.02 sec
      Start  7: GMMTest
 7/26 Test  #7: GMMTest ..........................   Passed    0.01 sec
      Start  8: HMMTest
 8/26 Test  #8: HMMTest ..........................   Passed    0.02 sec
      Start  9: KNNTest
 9/26 Test  #9: KNNTest ..........................   Passed    1.60 sec
      Start 10: LDATest
10/26 Test #10: LDATest ..........................   Passed    0.02 sec
      Start 11: MinDistTest
11/26 Test #11: MinDistTest ......................   Passed    0.02 sec
      Start 12: RandomForestsTest
12/26 Test #12: RandomForestsTest ................   Passed    0.02 sec
      Start 13: SVMTest
13/26 Test #13: SVMTest ..........................   Passed    0.02 sec
      Start 14: SoftmaxTest
14/26 Test #14: SoftmaxTest ......................   Passed    0.02 sec
      Start 15: SwipeDetectorTest
15/26 Test #15: SwipeDetectorTest ................   Passed    0.02 sec
      Start 16: ClassifierTest
16/26 Test #16: ClassifierTest ...................***Failed    0.02 sec
      Start 17: MatrixFloatTest
17/26 Test #17: MatrixFloatTest ..................   Passed  127.73 sec
      Start 18: MatrixTest
18/26 Test #18: MatrixTest .......................   Passed    0.02 sec
      Start 19: VectorFloatTest
19/26 Test #19: VectorFloatTest ..................   Passed    0.02 sec
      Start 20: VectorTest
20/26 Test #20: VectorTest .......................   Passed    0.02 sec
      Start 21: MLPRegressionTest
21/26 Test #21: MLPRegressionTest ................***Failed    7.62 sec
      Start 22: CommandLineParserTest
22/26 Test #22: CommandLineParserTest ............   Passed    0.02 sec
      Start 23: DictTest
23/26 Test #23: DictTest .........................   Passed    0.02 sec
      Start 24: DynamicTypeTest
24/26 Test #24: DynamicTypeTest ..................   Passed    0.02 sec
      Start 25: LoggingTest
25/26 Test #25: LoggingTest ......................   Passed    0.02 sec
      Start 26: TypedefsTest
26/26 Test #26: TypedefsTest .....................   Passed    0.02 sec

92% tests passed, 2 tests failed out of 26

Total Test time (real) = 138.00 sec

The following tests FAILED:
     16 - ClassifierTest (Failed)
     21 - MLPRegressionTest (Failed)
Errors while running CTest
make: *** [test] Error 8

How would I be able to investigate where this test failure is being originated?

kevinzhangftw commented 7 years ago

any updates on this?

nickgillian commented 7 years ago

The GRT uses the google test framework for unit testing. This outputs test logs to the following location, where $BUILD_DIR is the directory you make and run the tests from:

$BUILD_DIR/Testing/Temporary

You should find the following files in that directory (plus others if the tests fail):

CTestCostData.txt
LastTest.log

If you look at these files you will see detailed logs about what tests ran, how long they took, and where/why they failed.

The tests are running on my personal mac book pro, and on the build server, so it would be great if you can report what is causing the tests to fail so I can fix the issue.

Thanks!

narner commented 7 years ago

@nickgillian I pulled the most recent changes from Develop and tested this on my personal MacBookPro as well; all of the tests pass for me, but I am seeing the same "Getting Started" error as @kimjune01. As far as the "Hello World" error, it looks as though the HelloWorldTraining.grt file is missing from the examples folder.

nickgillian commented 7 years ago

I just pushed an update to dev that should fix the issues in the HelloWorldExample and GettingStarted examples.