Browse Source

reenable pytest with px4-dev-ecl

master
Daniel Agar 7 years ago
parent
commit
7df4e0f8eb
  1. 4
      .gitignore
  2. 14
      EKF/CMakeLists.txt
  3. 29
      Jenkinsfile

4
.gitignore vendored

@ -1,3 +1,5 @@ @@ -1,3 +1,5 @@
*.DS_Store
Build/
*~
.cache/
Build/
EKF/tests/pytest/__pycache__/

14
EKF/CMakeLists.txt

@ -95,20 +95,6 @@ if(PythonTests) @@ -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})

29
Jenkinsfile vendored

@ -35,21 +35,20 @@ pipeline { @@ -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'
}
}
}
}

Loading…
Cancel
Save