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

Commit 5aa762e3 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Reapply "Move smoke-excluded-tests.txt to texts/"" into main

parents 233cb916 3b11a3cc
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
{
  "presubmit": [
    // Non-ravenwood host side tests.
    { "name": "tiny-framework-dump-test" },
    { "name": "hoststubgentest" },
    { "name": "ravenhelpertest" },
    { "name": "hoststubgen-test-tiny-test" },
    { "name": "hoststubgen-invoke-test" },
    { "name": "ravenwood-scripts-sh-golden-test" },

    // This test fails with mysterious errors on the server side. Commenting out for now.
    // TODO(b/438195035) Un-comment it
    // { "name": "ravenwood-scripts-sh-golden-test" },

    // Device side tests for the bivalent tests.
    { "name": "RavenwoodMockitoTest_device" },
    { "name": "RavenwoodBivalentTest_device" },
    { "name": "RavenwoodBivalentTest_device_ravenizer" },
+13 −2
Original line number Diff line number Diff line
@@ -113,12 +113,17 @@ all_tests+=( "${all_raven_tests[@]}" )
: ${ROLLING_TF_SUBPROCESS_OUTPUT:=0}
export ROLLING_TF_SUBPROCESS_OUTPUT

# Cat all the files in the argument with all the "#" comments removed.
remove_comments() {
    sed -e '/^#/d; s/[ \t][ \t]*//g; /^$/d' "$@"
}

get_smoke_re() {
    # Extract tests from smoke-excluded-tests.txt
    # - Skip lines starting with #
    # - Remove all spaces and tabs
    # - Skip empty lines
    local tests=($(sed -e '/^#/d; s/[ \t][ \t]*//g; /^$/d' smoke-excluded-tests.txt))
    local tests=($(remove_comments ../texts/smoke-excluded-tests.txt))

    # Then convert it to a regex.
    # - Wrap in "^( ... )$"
@@ -186,7 +191,13 @@ if [[ "$RAVENWOOD_TEST_ENABLEMENT_POLICY" == "" ]] && (( "${#default_enablement_
    # This path must be a full path.
    combined_enablement_policy=/tmp/ravenwood-enablement-@@@$$@@@.txt

    cat "${default_enablement_policy[@]}" >$combined_enablement_policy
    # Join all the enablement policy files, but we add a newline
    # after each file. (so that it wouldn't break if any of the files
    # don't end with a newline.)
    for file in "${default_enablement_policy[@]}"; do
        cat "$file"
        echo
    done >$combined_enablement_policy

    export RAVENWOOD_TEST_ENABLEMENT_POLICY=$combined_enablement_policy
fi
+12 −2
Original line number Diff line number Diff line
@@ -33,7 +33,6 @@ esac
done
shift $(($OPTIND - 1))


# Find the script directory:
# - `../` when running directly.
# - './scripts/` when running with atest.
@@ -42,9 +41,20 @@ if [[ -e ./scripts/run-ravenwood-tests.sh ]] ; then
    script_dir=./scripts/
fi

target_script="$script_dir/run-ravenwood-tests.sh"

echo "# Installed files:"
echo
ls -lRa .
echo

echo "# Target script:"
echo "$target_script"
echo

# Command to run "run-ravenwood-tests.sh"
run-ravenwood-tests-wrapper() {
    $script_dir/run-ravenwood-tests.sh -d "$@"
    "$target_script" -d "$@"
}

# We "inject" into list-ravenwood-tests.sh and use them as the test module names.