Skip to content

Testing instructions

Ariel Malka edited this page Jul 13, 2015 · 12 revisions

Prerequisites:

  • iOS: device connected and accessible via ios-deploy
  • Android: device connected and accessible via adb
  • Emscripten: node accessible from the command-line

Starting point:

  • Boost:
  • GoogleTest:

Build and run TestBoost.cpp on the relevant platforms:

cd test

RUN_TEST -DPLATFORM=osx
RUN_TEST -DPLATFORM=ios
RUN_TEST -DPLATFORM=android
RUN_TEST -DPLATFORM=emscripten
RUN_TEST -DPLATFORM=mxe

Expected output:

[==========] Running 4 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 4 tests from TestBoost
[ RUN      ] TestBoost.TestIEquals
[       OK ] TestBoost.TestIEquals (0 ms)
[ RUN      ] TestBoost.TestLexicalCast
[       OK ] TestBoost.TestLexicalCast (0 ms)
[ RUN      ] TestBoost.TestFileSystem
[       OK ] TestBoost.TestFileSystem (0 ms)
[ RUN      ] TestBoost.TestFilteringStream
[       OK ] TestBoost.TestFilteringStream (0 ms)
[----------] 4 tests from TestBoost (0 ms total)

[----------] Global test environment tear-down
[==========] 4 tests from 1 test case ran. (0 ms total)
[  PASSED  ] 4 tests.

Notes:

  • A platform-agnostic CMakeLists.txt is used, together with CTestConfig.cmake
  • RUN_TEST is an alias to "ctest -S $GTEST_PATH/cmake/run.cmake -VV"
    • It invokes this CTest script
    • Pass -V instead of -VV in order to reduce verbosity

Clone this wiki locally