| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
set -eu |
| 4 |
|
| 5 |
mkdir -p "$(pwd)/debian/home" |
| 6 |
mkdir -p "$(pwd)/debian/run" |
| 7 |
export HOME="$(pwd)/debian/home" |
| 8 |
export XDG_RUNTIME_DIR="$(pwd)/debian/run" |
| 9 |
|
| 10 |
if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then |
| 11 |
CROSS_COMPILE="$DEB_HOST_GNU_TYPE-" |
| 12 |
else |
| 13 |
CROSS_COMPILE= |
| 14 |
fi |
| 15 |
|
| 16 |
if [ $(dpkg-architecture -q DEB_HOST_ARCH_ENDIAN) != "little" ]; then |
| 17 |
# Mir doesn't handle rendering on big endian systems |
| 18 |
exit 77 |
| 19 |
fi |
| 20 |
|
| 21 |
# Extracting the list of known-failures requires stubbing out various bits of CMake functionality in PrintExcludedTests.cmake |
| 22 |
# If upstream CMakeLists.txt starts using more CMake functionality, the list of stubs might need to be extended. |
| 23 |
KNOWN_FAILURES=$(cmake -DUPSTREAM_WLCS_TESTCASE_FILE=tests/acceptance-tests/wayland/CMakeLists.txt -P debian/tests/PrintExcludedTests.cmake 2>&1) || (echo "Failed to extract list of known-failures: $KNOWN_FAILURES"; exit 1) |
| 24 |
|
| 25 |
for failure in $KNOWN_FAILURES |
| 26 |
do |
| 27 |
FILTER=${FILTER:-}${FILTER:+:}${failure} |
| 28 |
done |
| 29 |
|
| 30 |
# Add extra failures from the autopkgtest infrastructure |
| 31 |
# |
| 32 |
# BufferTest.test_truncated_shm_file requries libwayland to be able to handle SIGSEGV from a signal |
| 33 |
# handler and continue. |
| 34 |
# This fails under some qemu targets and LXD. |
| 35 |
FILTER=${FILTER:-}${FILTER:+:}"BadBufferTest.test_truncated_shm_file" |
| 36 |
|
| 37 |
# These tests are incorrect (a correct implementation will fail them) |
| 38 |
# Fixed in next WLCS, with a different name so these exclusions should be safe |
| 39 |
FILTER=${FILTER:-}${FILTER:+:}"XdgPopupUnstableV6/XdgPopupTest.grabbed_popup_does_not_get_keyboard_focus/0" |
| 40 |
FILTER=${FILTER:-}${FILTER:+:}"XdgPopupStable/XdgPopupTest.grabbed_popup_does_not_get_keyboard_focus/0" |
| 41 |
|
| 42 |
|
| 43 |
$(${CROSS_COMPILE}pkg-config --variable test_runner wlcs) /usr/lib/$(dpkg-architecture -q DEB_HOST_MULTIARCH)/mir/miral_wlcs_integration.so --gtest_filter=-${FILTER} |