Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1f0a87ef authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Improve run-ravenwood-tests.sh" into main

parents 494fd287 7a315608
Loading
Loading
Loading
Loading
+13 −3
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ include_re=""
exclude_re=""
smoke_exclude_re=""
dry_run=""
while getopts "sx:f:dt" opt; do
while getopts "sx:f:dtb" opt; do
case "$opt" in
    s)
        # Remove slow tests.
@@ -52,8 +52,13 @@ case "$opt" in
        dry_run="echo"
        ;;
    t)
        # Redirect log to terminal
        export RAVENWOOD_LOG_OUT=$(tty)
        ;;
    b)
        # Build only
        ATEST=m
        ;;
    '?')
        exit 1
        ;;
@@ -99,11 +104,16 @@ done

# Calculate the removed tests.

diff="$(diff  <(echo "${all_tests[@]}" | tr ' ' '\n') <(echo "${targets[@]}" | tr ' ' '\n') )"
diff="$(diff  <(echo "${all_tests[@]}" | tr ' ' '\n') <(echo "${targets[@]}" | tr ' ' '\n') | grep -v [0-9] )"

if [[ "$diff" != "" ]]; then
    echo "Excluded tests:"
    echo "$diff"
fi

$dry_run ${ATEST:-atest} "${targets[@]}"
run() {
    echo "Running: ${@}"
    "${@}"
}

run $dry_run ${ATEST:-atest} "${targets[@]}"