[C] Changed travis

This commit is contained in:
seleznevae 2018-03-09 11:03:03 +03:00
parent c0c9356b4a
commit ccb4c46e3d
2 changed files with 16 additions and 6 deletions

View File

@ -9,9 +9,9 @@ matrix:
- pip install --user cpp-coveralls - pip install --user cpp-coveralls
after_success: after_success:
- coveralls --build-root build --include src --include tests --gcov-options '\-lp' - coveralls --build-root build --include src --include tests --gcov-options '\-lp'
# - os: linux - os: linux
# compiler: clang compiler: clang
# env: GCC_BUILD=OFF env: GCC_BUILD=OFF
@ -30,6 +30,16 @@ script:
- cd ../../.. - cd ../../..
- ls - ls
# Perform out-of-source build(CMake backend generation, build, and test)
# Test build without optimizations
- mkdir -p build
- cd build
- cmake .. -DFORT_TEST_BUILD=ON -DFORT_GCC_BUILD=${GCC_BUILD}
- cmake --build . --target all
- ls
- ./libfort_test
# # Perform out-of-source build(CMake backend generation, build, and test) # # Perform out-of-source build(CMake backend generation, build, and test)
# # Test build without optimizations # # Test build without optimizations
# - cd build # - cd build

View File

@ -38,14 +38,14 @@ add_executable(${PROJECT_NAME}
include_directories(tests/cmocka-1.1.0/include) include_directories(tests/cmocka-1.1.0/include)
link_directories(${CMAKE_SOURCE_DIR}/tests/cmocka-1.1.0/build/src) link_directories(${CMAKE_SOURCE_DIR}/tests/cmocka-1.1.0/build/src)
add_executable(TEST add_executable(libfort_test
${FORT_SOURCES} ${FORT_SOURCES}
tests/test.c tests/test.c
tests/test_vector.c tests/test_vector.c
tests/test_table.c tests/test_table.c
tests/test_string_buffer.c) tests/test_string_buffer.c)
target_link_libraries(TEST target_link_libraries(libfort_test
cmocka) cmocka)
@ -56,7 +56,7 @@ if(FORT_TEST_BUILD)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address")
if(FORT_GCC_BUILD) if(FORT_GCC_BUILD)
target_link_libraries(${PROJECT_NAME} asan) target_link_libraries(${PROJECT_NAME} asan)
target_link_libraries(TEST asan) target_link_libraries(libfort_test asan)
endif(FORT_GCC_BUILD) endif(FORT_GCC_BUILD)
endif(FORT_TEST_BUILD) endif(FORT_TEST_BUILD)