mirror of
https://github.com/labwc/labwc.git
synced 2026-04-12 08:21:13 -04:00
[wip] rewrite smoke test
This commit is contained in:
parent
bb24cd5faf
commit
767f3676ed
2 changed files with 15 additions and 31 deletions
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
|
@ -196,5 +196,5 @@ jobs:
|
||||||
export CC=gcc
|
export CC=gcc
|
||||||
meson setup build-gcc-ci -Dxwayland=enabled --werror
|
meson setup build-gcc-ci -Dxwayland=enabled --werror
|
||||||
meson compile -C build-gcc-ci
|
meson compile -C build-gcc-ci
|
||||||
scripts/ci/smoke-test.sh build-gcc-ci
|
LABWC_RUNS=20 scripts/ci/smoke-test.sh build-gcc-ci
|
||||||
' | $TARGET
|
' | $TARGET
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
LET_IT_SMOKE=y
|
: ${LABWC_RUNS:=1}
|
||||||
|
|
||||||
if ! test -x "$1/labwc"; then
|
if ! test -x "$1/labwc"; then
|
||||||
echo "$1/labwc not found"
|
echo "$1/labwc not found"
|
||||||
|
|
@ -41,35 +41,19 @@ gdb_run() {
|
||||||
--args "${args[@]}"
|
--args "${args[@]}"
|
||||||
return $?
|
return $?
|
||||||
}
|
}
|
||||||
|
echo "running with $LABWC_RUNS runs"
|
||||||
if test "$LET_IT_SMOKE" = "y"; then
|
ret=0
|
||||||
ret=0
|
for((i=1; i<=LABWC_RUNS; i++)); do
|
||||||
for x in {1..20}; do
|
printf "Starting run %2s\n" $i
|
||||||
printf "Starting run %2s\n" $x
|
output=$(gdb_run 2>&1)
|
||||||
output=$(gdb_run 2>&1)
|
ret=$?
|
||||||
ret=$?
|
if test $ret -ne 0; then
|
||||||
if test $ret -ne 0; then
|
echo "Crash encountered:"
|
||||||
echo "Crash enountered:"
|
echo "------------------"
|
||||||
echo "-----------------"
|
echo "$output"
|
||||||
echo "$output"
|
break
|
||||||
break
|
fi
|
||||||
fi
|
done
|
||||||
done
|
|
||||||
exit $ret
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Starting ${args[@]}"
|
|
||||||
output=$("${args[@]}" 2>&1)
|
|
||||||
ret=$?
|
|
||||||
|
|
||||||
if test $ret -ge 128; then
|
|
||||||
echo
|
|
||||||
echo "labwc crashed, restarting under gdb"
|
|
||||||
echo
|
|
||||||
gdb_run
|
|
||||||
else
|
|
||||||
echo "$output"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "labwc terminated with return code $ret"
|
echo "labwc terminated with return code $ret"
|
||||||
exit $ret
|
exit $ret
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue