qutebrowser/scripts/dev/ci/travis_run.sh

37 lines
1.3 KiB
Bash
Raw Normal View History

2016-03-15 19:23:49 +01:00
#!/bin/bash
if [[ $DOCKER ]]; then
2017-10-11 11:13:24 +02:00
docker run \
--privileged \
-v "$PWD:/outside" \
-e "QUTE_BDD_WEBENGINE=$QUTE_BDD_WEBENGINE" \
-e "DOCKER=$DOCKER" \
-e "CI=$CI" \
-e "TRAVIS=$TRAVIS" \
"qutebrowser/travis:$DOCKER"
elif [[ $TESTENV == eslint ]]; then
2017-10-11 11:13:24 +02:00
# Can't run this via tox as we can't easily install tox in the javascript
# travis env
cd qutebrowser/javascript || exit 1
2017-09-29 22:29:18 +02:00
eslint --color --report-unused-disable-directives .
2017-12-02 19:22:14 +01:00
elif [[ $TESTENV == shellcheck ]]; then
SCRIPTS=$( mktemp )
find scripts/dev/ -name '*.sh' >"$SCRIPTS"
find misc/userscripts/ -type f -exec grep -lE '[/ ][bd]ash$|[/ ]sh$|[/ ]ksh$' {} + >>"$SCRIPTS"
mapfile -t scripts <"$SCRIPTS"
rm -f "$SCRIPTS"
2017-12-02 19:22:14 +01:00
docker run \
-v "$PWD:/outside" \
-w /outside \
2017-12-03 09:29:38 +01:00
koalaman/shellcheck:latest "${scripts[@]}"
2016-03-15 19:23:49 +01:00
else
args=()
[[ $TRAVIS_OS_NAME == osx ]] && args=('--qute-bdd-webengine' '--no-xvfb' 'tests/unit')
Work around Travis CI crash test_caret.py crashes on Travis with this stack: ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so QSGBatchRenderer::Renderer::renderBatches() () from .../site-packages/PyQt5/Qt/lib/libQt5Quick.so.5 QSGBatchRenderer::Renderer::render() () from .../site-packages/PyQt5/Qt/lib/libQt5Quick.so.5 QSGRenderer::renderScene(QSGBindable const&) () from .../site-packages/PyQt5/Qt/lib/libQt5Quick.so.5 QSGRenderer::renderScene(unsigned int) () from .../site-packages/PyQt5/Qt/lib/libQt5Quick.so.5 QSGDefaultRenderContext::renderNextFrame(QSGRenderer*, unsigned int) () from .../site-packages/PyQt5/Qt/lib/libQt5Quick.so.5 QQuickWindowPrivate::renderSceneGraph(QSize const&) () from .../site-packages/PyQt5/Qt/lib/libQt5Quick.so.5 QQuickRenderControl::render() () from .../site-packages/PyQt5/Qt/lib/libQt5Quick.so.5 ?? () from .../site-packages/PyQt5/Qt/lib/libQt5QuickWidgets.so.5 ?? () from .../site-packages/PyQt5/Qt/lib/libQt5QuickWidgets.so.5 QObject::event(QEvent*) () from .../site-packages/PyQt5/Qt/lib/libQt5Core.so.5 QWidget::event(QEvent*) () from .../site-packages/PyQt5/Qt/lib/libQt5Widgets.so.5 QQuickWidget::event(QEvent*) () from .../site-packages/PyQt5/Qt/lib/libQt5QuickWidgets.so.5 ?? () from .../site-packages/PyQt5/Qt/lib/libQt5WebEngineWidgets.so.5 QApplicationPrivate::notify_helper(QObject*, QEvent*) () from .../site-packages/PyQt5/Qt/lib/libQt5Widgets.so.5 QApplication::notify(QObject*, QEvent*) () from .../site-packages/PyQt5/Qt/lib/libQt5Widgets.so.5 sipQApplication::notify(QObject*, QEvent*) () from .../site-packages/PyQt5/QtWidgets.so QCoreApplication::notifyInternal2(QObject*, QEvent*) () from .../site-packages/PyQt5/Qt/lib/libQt5Core.so.5 QTimerInfoList::activateTimers() () from .../site-packages/PyQt5/Qt/lib/libQt5Core.so.5 ?? () from .../site-packages/PyQt5/Qt/lib/libQt5Core.so.5 g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from .../site-packages/PyQt5/Qt/lib/libQt5Core.so.5 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from .../site-packages/PyQt5/Qt/lib/libQt5Core.so.5
2018-09-17 11:32:13 +02:00
# WORKAROUND for unknown crash inside swrast_dri.so
# See https://github.com/qutebrowser/qutebrowser/pull/4218#issuecomment-421931770
[[ $TESTENV == py36-pyqt59 ]] && export QT_QUICK_BACKEND=software
2017-09-10 13:21:03 +02:00
tox -e "$TESTENV" -- "${args[@]}"
2016-03-15 19:23:49 +01:00
fi