mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-23 10:57:34 +08:00
reenable pytest with px4-dev-ecl
This commit is contained in:
+3
-1
@@ -1,3 +1,5 @@
|
||||
*.DS_Store
|
||||
Build/
|
||||
*~
|
||||
.cache/
|
||||
Build/
|
||||
EKF/tests/pytest/__pycache__/
|
||||
|
||||
@@ -95,20 +95,6 @@ if(PythonTests)
|
||||
find_package(PythonLibs 3 REQUIRED)
|
||||
find_package(PythonInterp 3 REQUIRED)
|
||||
|
||||
# Check for required python packages
|
||||
file(READ "${CMAKE_SOURCE_DIR}/tests/pytest/requirements.txt" ECL_TEST_PYTHON_PACKAGES)
|
||||
# Strip version information and split into cmake list
|
||||
string(REGEX REPLACE "\n" ";" ECL_TEST_PYTHON_PACKAGES "${ECL_TEST_PYTHON_PACKAGES}")
|
||||
string(REGEX REPLACE "-" "_" ECL_TEST_PYTHON_PACKAGES "${ECL_TEST_PYTHON_PACKAGES}")
|
||||
string(REGEX REPLACE "[>=]+[^;]*" "" ECL_TEST_PYTHON_PACKAGES "${ECL_TEST_PYTHON_PACKAGES}")
|
||||
|
||||
foreach(package ${ECL_TEST_PYTHON_PACKAGES})
|
||||
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import ${package}" RESULT_VARIABLE PytestAvailable OUTPUT_QUIET ERROR_QUIET)
|
||||
if(${PytestAvailable})
|
||||
message(FATAL_ERROR "Python package missing:\n Please install ${package}, e.g., \"pip3 install --user ${package}\"")
|
||||
endif()
|
||||
endforeach(package)
|
||||
|
||||
# Need SWIG to wrap ecl
|
||||
find_package(SWIG REQUIRED)
|
||||
include(${SWIG_USE_FILE})
|
||||
|
||||
Vendored
+14
-15
@@ -35,21 +35,20 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
//stage('pytest') {
|
||||
// agent {
|
||||
// docker {
|
||||
// image 'px4io/px4-dev-base:2017-12-30'
|
||||
// args '-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw'
|
||||
// }
|
||||
// }
|
||||
// steps {
|
||||
// sh 'git clean -ff -x -d .'
|
||||
// sh 'git submodule deinit -f .'
|
||||
// sh 'git submodule update --init --recursive'
|
||||
// sh 'pip install --user -r ./EKF/tests/pytest/requirements.txt'
|
||||
// sh './build.sh'
|
||||
// }
|
||||
//}
|
||||
stage('pytest') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-ecl'
|
||||
args '-e CI=true -e CCACHE_BASEDIR=$WORKSPACE -e CCACHE_DIR=/tmp/ccache -v /tmp/ccache:/tmp/ccache:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'git clean -ff -x -d .'
|
||||
sh 'git submodule deinit -f .'
|
||||
sh 'git submodule update --init --recursive'
|
||||
sh 'RUN_PYTEST=1 ./build.sh'
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user