qbsp: add testqbsp target

This commit is contained in:
Eric Wasylishen 2017-07-08 15:48:25 -06:00
parent 7656d5c2f1
commit 34a6bf7876
6 changed files with 39 additions and 0 deletions

View File

@ -31,6 +31,8 @@ build_script:
msbuild /p:Configuration=Release /p:Platform=$cmakePlatform /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" PACKAGE.vcxproj
.\light\Release\testlight.exe
.\qbsp\Release\testqbsp.exe
artifacts:
- path: cmakebuild\*.zip
deploy:

View File

@ -14,10 +14,12 @@ tar xf embree.tgz
cmake .. -DCMAKE_BUILD_TYPE=Release -Dembree_DIR="$(pwd)/embree-2.15.0.x86_64.linux"
make -j8 VERBOSE=1
make -j8 VERBOSE=1 testlight
make -j8 VERBOSE=1 testqbsp
cpack
# run tests
./light/testlight || exit 1
./qbsp/testqbsp || exit 1
# check rpath
readelf -d ./light/light

View File

@ -19,7 +19,9 @@ EMBREE_CMAKE_DIR="$(pwd)/$EMBREE_DIR_NAME"
cmake .. -DCMAKE_BUILD_TYPE=Release -Dembree_DIR="$EMBREE_CMAKE_DIR"
make -j8
make -j8 testlight
make -j8 testqbsp
cpack
# run tests
./light/testlight || exit 1
./qbsp/testqbsp || exit 1

View File

@ -6,3 +6,20 @@ add_definitions(-DDOUBLEVEC_T)
add_executable(qbsp ${QBSP_SOURCES} main.cc)
target_link_libraries(qbsp ${CMAKE_THREAD_LIBS_INIT})
install(TARGETS qbsp RUNTIME DESTINATION bin)
# test (copied from light/CMakeLists.txt)
set(GOOGLETEST_SOURCES ${CMAKE_SOURCE_DIR}/3rdparty/googletest/src/gtest-all.cc)
include_directories(${CMAKE_SOURCE_DIR}/3rdparty/googletest/include)
include_directories(${CMAKE_SOURCE_DIR}/3rdparty/googletest)
set(QBSP_TEST_SOURCE
${QBSP_SOURCES}
${GOOGLETEST_SOURCES}
test.cc
test_qbsp.cc)
add_executable(testqbsp EXCLUDE_FROM_ALL ${QBSP_TEST_SOURCE})
add_test(testqbsp testqbsp)
target_link_libraries (testqbsp ${CMAKE_THREAD_LIBS_INIT})

6
qbsp/test.cc Normal file
View File

@ -0,0 +1,6 @@
#include "gtest/gtest.h"
int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}

10
qbsp/test_qbsp.cc Normal file
View File

@ -0,0 +1,10 @@
#include "gtest/gtest.h"
#include <qbsp/qbsp.hh>
using namespace std;
TEST(qbsp, test) {
FAIL();
}