tests: Use --screen manual for both code coverage jobs.
This commit is contained in:
parent
852ff9c340
commit
067f8f4ebf
|
@ -50,14 +50,14 @@ addons:
|
|||
|
||||
jobs:
|
||||
include:
|
||||
- env: LUA=5.2 LUANAME=lua5.2 DO_COVERAGE=coveralls
|
||||
- env: LUA=5.2 LUANAME=lua5.2 DO_COVERAGE=coveralls MANUAL_SCREENS=1
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- *BASE_PACKAGES
|
||||
- liblua5.2-dev
|
||||
- lua5.2
|
||||
- env: LUA=5.3 LUANAME=lua5.3 DO_COVERAGE=codecov
|
||||
- env: LUA=5.3 LUANAME=lua5.3 DO_COVERAGE=codecov MANUAL_SCREENS=1
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
|
@ -229,7 +229,8 @@ install:
|
|||
return 0
|
||||
}
|
||||
script:
|
||||
- export CMAKE_ARGS="-DLUA_LIBRARY=${LUALIBRARY} -DLUA_INCLUDE_DIR=${LUAINCLUDE} -D OVERRIDE_VERSION=$AWESOME_VERSION -DSTRICT_TESTS=true -D DO_COVERAGE=$DO_COVERAGE -D CMAKE_C_FLAGS=-Werror"
|
||||
- if [ "$MANUAL_SCREENS" != "1" ]; then export MANUAL_SCREENS=0; fi
|
||||
- export CMAKE_ARGS="-DLUA_LIBRARY=${LUALIBRARY} -D LUA_INCLUDE_DIR=${LUAINCLUDE} -D OVERRIDE_VERSION=$AWESOME_VERSION -D STRICT_TESTS=true -D DO_COVERAGE=$DO_COVERAGE -D TEST_MANUAL_SCREENS=$MANUAL_SCREENS -D CMAKE_C_FLAGS=-Werror"
|
||||
- |
|
||||
if [ "$EMPTY_THEME_WHILE_LOADING" = 1 ]; then
|
||||
# Break beautiful so that trying to access the theme before beautiful.init() causes an error
|
||||
|
|
|
@ -404,6 +404,12 @@ target_link_libraries(test-gravity
|
|||
if(DO_COVERAGE)
|
||||
set(TESTS_RUN_ENV DO_COVERAGE=1)
|
||||
endif()
|
||||
|
||||
# Start AwesomeWM tests with `--screen off`
|
||||
if ("${TEST_MANUAL_SCREENS}" MATCHES "1")
|
||||
set(TEST_RUN_ARGS "--W --m")
|
||||
endif()
|
||||
|
||||
add_custom_target(check-integration
|
||||
${CMAKE_COMMAND} -E env CMAKE_BINARY_DIR='${CMAKE_BINARY_DIR}' ${TESTS_RUN_ENV} ./tests/run.sh \$\${TEST_RUN_ARGS:--W}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
|
|
10
tests/run.sh
10
tests/run.sh
|
@ -23,16 +23,19 @@ Usage: $0 [OPTION]... [FILE]...
|
|||
Options:
|
||||
-v: verbose mode
|
||||
-W: warnings become errors
|
||||
-m: Use --screen off
|
||||
-h: show this help
|
||||
EOF
|
||||
exit "$1"
|
||||
}
|
||||
fail_on_warning=
|
||||
manual_screens=
|
||||
verbose=${VERBOSE:-0}
|
||||
while getopts vWh opt; do
|
||||
while getopts vWmh opt; do
|
||||
case $opt in
|
||||
v) verbose=1 ;;
|
||||
W) fail_on_warning=1 ;;
|
||||
m) manual_screens=" --screen off" ;;
|
||||
h) usage 0 ;;
|
||||
*) usage 64 ;;
|
||||
esac
|
||||
|
@ -105,7 +108,9 @@ fi
|
|||
|
||||
# Add test dir (for _runner.lua).
|
||||
# shellcheck disable=SC2206
|
||||
awesome_options=($AWESOME_OPTIONS --search lib --search "$this_dir")
|
||||
awesome_options=($AWESOME_OPTIONS $manual_screens --search lib --search "$this_dir")
|
||||
|
||||
awesome_options+=(--screen off)
|
||||
|
||||
# Cleanup on errors / aborting.
|
||||
cleanup() {
|
||||
|
@ -172,6 +177,7 @@ fi
|
|||
# Start awesome.
|
||||
start_awesome() {
|
||||
cd "$build_dir"
|
||||
|
||||
# Kill awesome after $TEST_TIMEOUT seconds (e.g. for errors during test setup).
|
||||
# SOURCE_DIRECTORY is used by .luacov.
|
||||
DISPLAY="$D" SOURCE_DIRECTORY="$source_dir" \
|
||||
|
|
Loading…
Reference in New Issue