Skip to content

Commit d9d39c6

Browse files
committed
CI: support execution of wx GUI on travis
- provide DISPLAY on Linux via xvfb-run - execute with Python.app on Mac OS X - add python-wxtools to test with system Python
1 parent 7038216 commit d9d39c6

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

.travis.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ addons:
3131
- python-dev
3232
- python-numpy
3333
- python-setuptools
34+
- python-wxtools
3435

3536
before_install:
3637
- MYNAME=diffpy.pdfgui
@@ -95,8 +96,17 @@ install:
9596
exit 1;
9697
fi
9798

99+
before_script:
100+
# provide shell functions to execute coverage with GUI support
101+
- case ${TRAVIS_OS_NAME} in
102+
linux)
103+
guicoverage() { xvfb-run coverage "$@"; } ;;
104+
osx)
105+
guicoverage() { pythonw -m coverage "$@"; } ;;
106+
esac
107+
98108
script:
99-
- coverage run --source ${MYNAME} -m ${MYNAME}.tests.rundeps
109+
- guicoverage run --source ${MYNAME} -m ${MYNAME}.tests.rundeps
100110

101111
after_success:
102112
- pip install $MYPIPFLAGS codecov

0 commit comments

Comments
 (0)