mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
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:
@@ -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 ..
|
||||
|
||||
@@ -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
16
run-cpp-tests.sh
Executable 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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
13
wpilibc/wpilibC++/CMakeLists.txt
Normal file
13
wpilibc/wpilibC++/CMakeLists.txt
Normal 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
Reference in New Issue
Block a user