Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
620a808a
Commit
620a808a
authored
Feb 27, 2017
by
Dean Moldovan
Committed by
Wenzel Jakob
Feb 28, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test with debug build of Python when DEBUG=1 on Travis
parent
5fe9908b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
2 deletions
+10
-2
.travis.yml
+5
-1
tests/CMakeLists.txt
+1
-1
tests/test_cmake_build/installed_target/CMakeLists.txt
+4
-0
No files found.
.travis.yml
View file @
620a808a
...
@@ -147,9 +147,13 @@ install:
...
@@ -147,9 +147,13 @@ install:
-
|
-
|
# Install dependencies
# Install dependencies
if [ -n "$DOCKER" ]; then
if [ -n "$DOCKER" ]; then
if [ -n "$DEBUG" ]; then
PY_DEBUG="python$PY-dbg python$PY-scipy-dbg"
export CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} -DPYTHON_EXECUTABLE=/usr/bin/python${PYTHON}dm"
fi
docker exec --tty "$containerid" sh -c "for s in 0 15; do sleep \$s; \
docker exec --tty "$containerid" sh -c "for s in 0 15; do sleep \$s; \
apt-get -qy --no-install-recommends $APT_GET_EXTRA install \
apt-get -qy --no-install-recommends $APT_GET_EXTRA install \
python$PY-dev python$PY-pytest python$PY-scipy \
$PY_DEBUG
python$PY-dev python$PY-pytest python$PY-scipy \
libeigen3-dev cmake make ${COMPILER_PACKAGES} && break; done"
libeigen3-dev cmake make ${COMPILER_PACKAGES} && break; done"
else
else
pip install numpy scipy pytest
pip install numpy scipy pytest
...
...
tests/CMakeLists.txt
View file @
620a808a
...
@@ -159,7 +159,7 @@ if(NOT PYBIND11_PYTEST_FOUND)
...
@@ -159,7 +159,7 @@ if(NOT PYBIND11_PYTEST_FOUND)
endif
()
endif
()
# A single command to compile and run the tests
# A single command to compile and run the tests
add_custom_target
(
pytest COMMAND
${
PYTHON_EXECUTABLE
}
-m pytest -rws
${
PYBIND11_PYTEST_FILES
}
add_custom_target
(
pytest COMMAND
${
PYTHON_EXECUTABLE
}
-m pytest -rws
--capture=sys
${
PYBIND11_PYTEST_FILES
}
DEPENDS pybind11_tests WORKING_DIRECTORY
${
testdir
}
)
DEPENDS pybind11_tests WORKING_DIRECTORY
${
testdir
}
)
if
(
PYBIND11_TEST_OVERRIDE
)
if
(
PYBIND11_TEST_OVERRIDE
)
...
...
tests/test_cmake_build/installed_target/CMakeLists.txt
View file @
620a808a
...
@@ -14,5 +14,9 @@ target_link_libraries(test_cmake_build PRIVATE pybind11::module)
...
@@ -14,5 +14,9 @@ target_link_libraries(test_cmake_build PRIVATE pybind11::module)
set_target_properties
(
test_cmake_build PROPERTIES PREFIX
"
${
PYTHON_MODULE_PREFIX
}
"
set_target_properties
(
test_cmake_build PROPERTIES PREFIX
"
${
PYTHON_MODULE_PREFIX
}
"
SUFFIX
"
${
PYTHON_MODULE_EXTENSION
}
"
)
SUFFIX
"
${
PYTHON_MODULE_EXTENSION
}
"
)
# Do not treat includes from IMPORTED target as SYSTEM (Python headers in pybind11::module).
# This may be needed to resolve header conflicts, e.g. between Python release and debug headers.
set_target_properties
(
test_cmake_build PROPERTIES NO_SYSTEM_FROM_IMPORTED ON
)
add_custom_target
(
check
${
CMAKE_COMMAND
}
-E env PYTHONPATH=$<TARGET_FILE_DIR:test_cmake_build>
add_custom_target
(
check
${
CMAKE_COMMAND
}
-E env PYTHONPATH=$<TARGET_FILE_DIR:test_cmake_build>
${
PYTHON_EXECUTABLE
}
${
PROJECT_SOURCE_DIR
}
/../test.py
${
PROJECT_NAME
}
)
${
PYTHON_EXECUTABLE
}
${
PROJECT_SOURCE_DIR
}
/../test.py
${
PROJECT_NAME
}
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment