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

Commit e7aac2a6 authored by Makoto Onuki's avatar Makoto Onuki Committed by Android (Google) Code Review
Browse files

Merge "Make use of platform Flaky annotation too" into main

parents 3c357d11 2d3537f9
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -47,6 +47,9 @@ $my_command: Run all or specified ravenwood tests
     $my_command [OPTIONS] TEST-MODULE-NAME...
        Run specified test module

  Note:
     Tests with @FlakyTest are always ignored.

  Options:
EOF
    sed -n -e '/OPTIONS-START/,/OPTIONS-END/s/^ *\([a-zA-Z]\)) #/   -\1/p' "$my_command"
@@ -216,6 +219,7 @@ for test in $(remove_comments ../texts/experimental-api-allowed-tests.txt); do
done

echo "RAVENWOOD_RUN_DISABLED_TESTS=$RAVENWOOD_RUN_DISABLED_TESTS"
echo "RAVENWOOD_FORCE_FILTER_REGEX=$RAVENWOOD_FORCE_FILTER_REGEX"

# =========================================================

@@ -231,6 +235,7 @@ extra_args=()
exclude_annos=()
# Always ignore flaky tests
exclude_annos+=(
    "android.platform.test.annotations.FlakyTest"
    "androidx.test.filters.FlakyTest"
)
# Maybe ignore large tests
+63 −22

File changed.

Preview size limit exceeded, changes collapsed.

+4 −0
Original line number Diff line number Diff line
@@ -89,6 +89,8 @@ run_test() {
# Run the target commands.
run_all_commands() {
    unset RAVENWOOD_TEST_ENABLEMENT_POLICY
    unset RAVENWOOD_RUN_DISABLED_TESTS
    unset RAVENWOOD_FORCE_FILTER_REGEX

    run_test "Run with no arguments" run-ravenwood-tests-wrapper

@@ -115,6 +117,8 @@ run_all_commands() {

    run_test "Run with disabled tests" run-ravenwood-tests-wrapper -R

    RAVENWOOD_RUN_DISABLED_TESTS=xxx RAVENWOOD_FORCE_FILTER_REGEX=yyy run_test "Make sure env vars are printed" run-ravenwood-tests-wrapper

    echo "== All commands finished =="
}

+27 −2
Original line number Diff line number Diff line
@@ -30,13 +30,24 @@ query='
select
    Class || "#" || RawMethodName ||
    (case when (sum(failed) + sum(skipped)) = 0 then "" else " disable" end )
    as "# AUTO-GENERATED START"
    as "# Per method enable/disable"
from stdin
where type="m"
group by Class, RawMethodName
order by Class, RawMethodName
'

summary_query='
select
    "# Total=" || printf("%d",sum(passed) + sum(failed) + sum(skipped)) || " " ||
    "Passed=" || printf("%d", sum(passed)) || " " ||
    "Failed=" || printf("%d", sum(failed)) || " " ||
    "Skipped=" || printf("%d", sum(skipped))
    as "# Summary"
from stdin
where type="m"
'

# Return the test module name from a policy file.
get_module_name() {
    local file="$1"
@@ -54,6 +65,12 @@ get_header() {
    sed -e '/^# AUTO-GENERATED START/,$d' $1
}

# Normalize the csvsql output.
normalize() {
    # Remove the header, and convert to space-delimited.
    csvformat -E -M $'\n' -D $'\t'
}

do_main() {
    local policies="$@"
    for policy in $policies ; do
@@ -71,7 +88,15 @@ do_main() {
        new="$policy.tmp"
        {
            get_header "$policy"
            csvsql --query "$query" < "$csv"
            echo "# AUTO-GENERATED START"
            echo

            # Summary
            csvsql --query "$summary_query" < "$csv" | normalize

            echo
            # Per-method enable/disable
            csvsql --query "$query" < "$csv" | normalize
            echo "Success" 1>&2
        } >"$new"

+3 −0
Original line number Diff line number Diff line
@@ -24,6 +24,9 @@ android.view.cts.PointerCaptureTest never
# We list failed tests as "disable" too to keep track of known test methods.

# AUTO-GENERATED START

# Total=915 Passed=574 Failed=334 Skipped=7

android.view.cts.AbsSavedStateTest#testConstructor disable
android.view.cts.AbsSavedStateTest#testConstructorNullParcel
android.view.cts.AbsSavedStateTest#testConstructorNullParcelAndClassLoader