mirror of
https://github.com/zebrajr/tensorflow.git
synced 2025-12-06 00:19:58 +01:00
Add -mac_excluded to TF build/test tag filters
Currently, `no_mac` or `nomac` is used to exclude a test from running in the mac environment. However, it is difficult to distinguish between temporary and permanent exclusions. For example, a test may be disabled temporarily if it is broken, or it may be designed to not run on mac environment permanently. To address this issue, we introduce a new tag `mac_excluded` for platform exclusion design. `no_mac` or `nomac` will now be considered to disable broken tests, while `mac_excluded` will be used to permanently exclude a test from running on mac environment. PiperOrigin-RevId: 515676485
This commit is contained in:
parent
c127e39cbb
commit
999ed30091
|
|
@ -984,7 +984,7 @@ def system_specific_test_config(environ_cp):
|
|||
else:
|
||||
test_and_build_filters.append('-gpu')
|
||||
elif is_macos():
|
||||
test_and_build_filters += ['-gpu', '-nomac', '-no_mac']
|
||||
test_and_build_filters += ['-gpu', '-nomac', '-no_mac', '-mac_excluded']
|
||||
elif is_linux():
|
||||
if ((environ_cp.get('TF_NEED_CUDA', None) == '1') or
|
||||
(environ_cp.get('TF_NEED_ROCM', None) == '1')):
|
||||
|
|
|
|||
|
|
@ -185,8 +185,8 @@ update_test_filter_tags() {
|
|||
add_test_filter_tag -no_pip -nopip
|
||||
# MacOS filter tags
|
||||
if [[ ${OS_TYPE} == "macos" ]]; then
|
||||
remove_test_filter_tag nomac no_mac
|
||||
add_test_filter_tag -nomac -no_mac
|
||||
remove_test_filter_tag nomac no_mac mac_excluded
|
||||
add_test_filter_tag -nomac -no_mac -mac_excluded
|
||||
fi
|
||||
echo "Final test filter tags: ${TF_TEST_FILTER_TAGS}"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ if [[ ${IS_ROCM} == "1" ]]; then
|
|||
fi
|
||||
if [[ ${IS_MAC} == "1" ]]; then
|
||||
# TODO(b/122370901): Fix nomac, no_mac inconsistency.
|
||||
PIP_TEST_FILTER_TAG="-nomac,-no_mac,${PIP_TEST_FILTER_TAG}"
|
||||
PIP_TEST_FILTER_TAG="-nomac,-no_mac,-mac_excluded,${PIP_TEST_FILTER_TAG}"
|
||||
fi
|
||||
|
||||
# Bazel flags we need for all tests:
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ export PYTHON_BIN_PATH=$(which python2)
|
|||
yes "" | $PYTHON_BIN_PATH configure.py
|
||||
which bazel
|
||||
# TODO(b/122370901): Fix nomac, no_mac inconsistency.
|
||||
bazel test --test_tag_filters=-no_oss,-gpu,-tpu,-benchmark-test,-nomac,-no_mac \
|
||||
bazel test --test_tag_filters=-no_oss,-gpu,-tpu,-benchmark-test,-nomac,-no_mac,-mac_excluded \
|
||||
--test_timeout 300,450,1200,3600 \
|
||||
--test_size_filters=small,medium --config=opt \
|
||||
--jobs=${N_JOBS} --build_tests_only --test_output=errors -k -- \
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ export PYTHON_BIN_PATH=$(which python2)
|
|||
yes "" | $PYTHON_BIN_PATH configure.py
|
||||
which bazel
|
||||
# TODO(b/122370901): Fix nomac, no_mac inconsistency.
|
||||
bazel test --test_tag_filters=-no_oss,-gpu,-tpu,-benchmark-test,-nomac,-no_mac \
|
||||
bazel test --test_tag_filters=-no_oss,-gpu,-tpu,-benchmark-test,-nomac,-no_mac,-mac_excluded \
|
||||
--test_timeout 300,450,1200,3600 --config=opt \
|
||||
--announce_rc \
|
||||
--test_size_filters=small,medium \
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ export TF_NEED_CUDA=0
|
|||
export PYTHON_BIN_PATH=$(which python3)
|
||||
yes "" | $PYTHON_BIN_PATH configure.py
|
||||
which bazel
|
||||
bazel test --test_tag_filters=-no_oss,-gpu,-tpu,-benchmark-test,-nomac,-no_mac \
|
||||
bazel test --test_tag_filters=-no_oss,-gpu,-tpu,-benchmark-test,-nomac,-no_mac,-mac_excluded \
|
||||
--announce_rc \
|
||||
--test_timeout 300,450,1200,3600 \
|
||||
--test_size_filters=small,medium \
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ python -m venv .tf-venv && source .tf-venv/bin/activate
|
|||
# Set up and install MacOS pip dependencies.
|
||||
install_macos_pip_deps
|
||||
|
||||
tag_filters="-no_oss,-oss_serial,-no_oss_py310,-nomac,-no_mac$(maybe_skip_v1),-gpu,-tpu,-benchmark-test"
|
||||
tag_filters="-no_oss,-oss_serial,-no_oss_py310,-mac_excluded,-nomac,-no_mac$(maybe_skip_v1),-gpu,-tpu,-benchmark-test"
|
||||
|
||||
# Get the default test targets for bazel.
|
||||
source tensorflow/tools/ci_build/build_scripts/DEFAULT_TEST_TARGETS.sh
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ python -m venv .tf-venv && source .tf-venv/bin/activate
|
|||
# Set up and install MacOS pip dependencies.
|
||||
install_macos_pip_deps
|
||||
|
||||
tag_filters="-no_oss,-oss_serial,-nomac,-no_mac$(maybe_skip_v1),-gpu,-tpu,-benchmark-test"
|
||||
tag_filters="-no_oss,-oss_serial,-mac_excluded,-nomac,-no_mac$(maybe_skip_v1),-gpu,-tpu,-benchmark-test"
|
||||
|
||||
# Get the default test targets for bazel.
|
||||
source tensorflow/tools/ci_build/build_scripts/DEFAULT_TEST_TARGETS.sh
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ python -m venv .tf-venv && source .tf-venv/bin/activate
|
|||
# Set up and install MacOS pip dependencies.
|
||||
install_macos_pip_deps
|
||||
|
||||
tag_filters="-no_oss,-oss_serial,-nomac,-no_mac$(maybe_skip_v1),-gpu,-tpu,-benchmark-test"
|
||||
tag_filters="-no_oss,-oss_serial,-mac_excluded,-nomac,-no_mac$(maybe_skip_v1),-gpu,-tpu,-benchmark-test"
|
||||
|
||||
# Get the default test targets for bazel.
|
||||
source tensorflow/tools/ci_build/build_scripts/DEFAULT_TEST_TARGETS.sh
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ function bazel_test_wheel {
|
|||
# Run Bazel Test
|
||||
PY_MAJ_MINOR_VER=$(python -c "print(__import__('sys').version)" 2>&1 | awk '{ print $1 }' | head -n 1 | awk -F'.' '{printf "%s%s\n", $1, $2 }')
|
||||
TF_TEST_FLAGS="--define=no_tensorflow_py_deps=true --test_lang_filters=py --test_output=errors --verbose_failures=true --keep_going --test_env=TF2_BEHAVIOR=1"
|
||||
TF_TEST_FILTER_TAGS="-nopip,-no_pip,-nomac,-no_mac,-no_oss,-oss_serial,-no_oss_py${PY_MAJ_MINOR_VER},-v1only,-gpu,-tpu,-benchmark-test"
|
||||
TF_TEST_FILTER_TAGS="-nopip,-no_pip,-nomac,-no_mac,-mac_excluded,-no_oss,-oss_serial,-no_oss_py${PY_MAJ_MINOR_VER},-v1only,-gpu,-tpu,-benchmark-test"
|
||||
BAZEL_PARALLEL_TEST_FLAGS="--local_test_jobs=$(sysctl -n hw.ncpu)"
|
||||
|
||||
# Install additional test requirements
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user