Browse Source

Unit test: print test log to Travis and AppVeyor output

bel2125 7 years ago
parent
commit
d0c0b066de
2 changed files with 5 additions and 2 deletions
  1. 1 0
      .travis.yml
  2. 4 2
      appveyor.yml

+ 1 - 0
.travis.yml

@@ -102,6 +102,7 @@ script:
       make -f Makefile.osx package;
     else
       CTEST_OUTPUT_ON_FAILURE=1 make all test;
+      cat test.log;
     fi
 
 # Coveralls options: https://github.com/eddyxu/cpp-coveralls/blob/master/README.md

+ 4 - 2
appveyor.yml

@@ -362,13 +362,15 @@ test_script:
   - cd "%build_path%"
   - appveyor AddMessage -Category Information "Test command '%build%'"
   - set CTEST_OUTPUT_ON_FAILURE=1
-  - cmd /c "%test%"
+  - cmd /c "%test%" & set "test_ret=%ERRORLEVEL%"
+  - echo "Test returned %test_ret%"
+  - echo test.log
   - cd "%source_path%"
-
   - set "output_path=%source_path%\output"
   - set "build_path=%output_path%\build"
   - set "install_path=%output_path%\install"
   - set "third_party_dir=C:\third-party"
+  - exit /B %ERRORLEVEL%
 
 after_test:
   - echo "Current directory:"