Added cmake test to Travis CI build.

This commit is contained in:
John McNamara 2019-12-26 17:13:43 +00:00
parent 1290420818
commit 10cd43179b
3 changed files with 15 additions and 0 deletions

5
.gitignore vendored
View File

@ -48,3 +48,8 @@ third_party/zlib-1.2.8/examplesh
third_party/zlib-1.2.8/minigzip
third_party/zlib-1.2.8/minigzipsh
third_party/zlib-1.2.8/zlib.pc
cmake
!cmake/FindMINIZIP.cmake
!cmake/FindPackage.cmake
!cmake/i686-toolchain.cmake

View File

@ -32,6 +32,7 @@ script:
- make V=1
- make test_functional V=1
- make test_unit V=1
- make test_cmake V=1
- make examples V=1
- make test_valgrind V=1
- sudo make install V=1

View File

@ -84,6 +84,15 @@ endif
$(Q)$(MAKE) -C src test_lib
$(Q)$(MAKE) -C test/unit test
# Test Cmake. This test should really be done with Cmake in the cmake dir but
# this is a workaround for now.
test_cmake :
$(Q)$(MAKE) -C src clean
$(Q)cd cmake; cmake .. -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON; make clean; make; cp libxlsxwriter.a ../src/
$(Q)cmake/xlsxwriter_unit
$(Q)$(MAKE) -C test/functional/src
$(Q)$(PYTEST) test/functional -v -k $(PYTESTFILES)
# Test the functional test exes with valgrind (in 64bit mode only).
test_valgrind : all
ifndef NO_VALGRIND