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

Commit b1d411ee authored by Makoto Onuki's avatar Makoto Onuki
Browse files

Exclude flaky tests from run-ravenwood-tests

Bug: 292141694
Flag: TEST_ONLY
Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh -s
Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh
Change-Id: I5d76164f44a49a64cc682eb3e93e7c2a2a37720e
parent c8fcf88a
Loading
Loading
Loading
Loading
+23 −5
Original line number Diff line number Diff line
@@ -172,18 +172,36 @@ run() {
}

extra_args=()
if (( $exclude_large_tests && ! $build_only )) ; then


# Exclusion filter annotations
exclude_annos=()
# Always ignore flaky tests
exclude_annos+=(
    "androidx.test.filters.FlakyTest"
)
# Maybe ignore large tests
if (( $exclude_large_tests )) ; then
    exclude_annos+=(
        "android.platform.test.annotations.LargeTest"
        "androidx.test.filters.LargeTest"
    )
fi

# Add per-module arguments
if (( ! $build_only )) ; then
    extra_args+=("--")

    # Need to add the following two options for each module.
    # But we can't add it to non-ravenwood tests, so use $all_raven_tests
    # instead of $targets.
    for module in "${all_raven_tests[@]}" ; do
        for anno in "${exclude_annos[@]}" ; do
            extra_args+=(
            "--module-arg $module:exclude-annotation:android.platform.test.annotations.LargeTest"
            "--module-arg $module:exclude-annotation:androidx.test.filters.LargeTest"
                "--module-arg $module:exclude-annotation:$anno"
                )
        done
    done
fi

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