C++ testing

Made a toplevel directory for C++ and C++ tests

Change-Id: I4bc2074a7036ec7fe79568b411637a5bee9eb5b3

Added the C++ testing framework and one test

Change-Id: I1e80a1e16b251a49666820a9d4c8caa025da9785
This commit is contained in:
thomasclark
2014-06-02 10:12:08 -04:00
parent 9a145db3d5
commit bb50f4b134
245 changed files with 32204 additions and 13 deletions

View File

@@ -15,7 +15,7 @@ make # multicore add -j(num of cpu cores + 1), so -j3 on dual core for faster co
make install DESTDIR=/some/dir/you/want/to/put/all/headers/and/libs #optional
``
Alternatively, if you like IDE's, you can import it directly into QtDeveloper, or a number of other IDE's such as Code::Blocks or Eclipse. See CMake documentation for details.
Alternatively, if you like IDEs, you can import it directly into QtDeveloper, or a number of other IDEs such as Code::Blocks or Eclipse. See CMake documentation for details.
Eclipse demo:
```
cd ..

View File

@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 2.8)
project(All-WPILib)
set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat=2 -Wextra -Wno-unused-parameter -fPIC -Werror")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat=2 -Wextra -Wno-unused-parameter -fPIC")
SET(CMAKE_SKIP_BUILD_RPATH TRUE)
file(GLOB_RECURSE NI_LIBS ni-libraries/*.so*)

16
run-cpp-tests.sh Executable file
View File

@@ -0,0 +1,16 @@
#!/usr/bin/env bash
# Temporary method to deploy C++ integration tests to the RoboRIO
if [ $(which sshpass) ]
then
sshpass -p "" ssh admin@10.1.90.2 killall FRCUserProgram
sshpass -p "" scp cmake/target/cmake/wpilibc/wpilibC++IntegrationTests/FRCUserProgram admin@10.1.90.2:/home/admin
sshpass -p "" ssh admin@10.1.90.2 ./FRCUserProgram
else
ssh admin@10.1.90.2 killall FRCUserProgram
scp cmake/target/cmake/wpilibc/wpilibC++IntegrationTests/FRCUserProgram admin@10.1.90.2:/home/admin
ssh admin@10.1.90.2 ./FRCUserProgram
fi

View File

@@ -1,13 +1,5 @@
cmake_minimum_required(VERSION 2.8)
project(WPILib)
project(WPILibC)
file(GLOB_RECURSE SRC_FILES lib/*.cpp)
include_directories(include/ ${HAL_API_INCLUDES} ${NWT_API_INCLUDES})
add_library(WPILibAthena STATIC ${SRC_FILES})
target_link_libraries(WPILibAthena HALAthena NetworkTables ${NI_LIBS})
INSTALL(TARGETS WPILibAthena ARCHIVE DESTINATION lib COMPONENT lib)
INSTALL(DIRECTORY include DESTINATION ${CMAKE_INSTALL_PREFIX} COMPONENT headers)
# lib/ c m gcc_s ld-linux
# usr/lib stdc++
# ni_emb
# HAL NWT
add_subdirectory(wpilibC++)
add_subdirectory(wpilibC++IntegrationTests)

View File

@@ -0,0 +1,13 @@
cmake_minimum_required(VERSION 2.8)
project(WPILibC++)
file(GLOB_RECURSE SRC_FILES lib/*.cpp)
include_directories(include/ ${HAL_API_INCLUDES} ${NWT_API_INCLUDES})
add_library(WPILibAthena STATIC ${SRC_FILES})
target_link_libraries(WPILibAthena HALAthena NetworkTables ${NI_LIBS})
INSTALL(TARGETS WPILibAthena ARCHIVE DESTINATION lib COMPONENT lib)
INSTALL(DIRECTORY include DESTINATION ${CMAKE_INSTALL_PREFIX} COMPONENT headers)
# lib/ c m gcc_s ld-linux
# usr/lib stdc++
# ni_emb
# HAL NWT

Some files were not shown because too many files have changed in this diff Show More