Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(bazel): improve logging of bazel CI tests #2749

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ build --cxxopt -std=c++17
# Treat warnings as errors
build --copt -Werror

# Common options for --config=ci
build:ci --curses=no
build:ci --color=no
build:ci --noshow_progress
build:ci --noshow_loading_progress
build:ci --show_timestamps
build:ci --terminal_columns=0
build:ci --verbose_failures

# When building with the address sanitizer
# E.g., bazel build --config asan
build:asan --repo_env CC=clang
Expand Down
3 changes: 3 additions & 0 deletions tensorflow/lite/micro/tools/ci_build/test_bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# ==============================================================================

set -e
set -x

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ROOT_DIR=${SCRIPT_DIR}/../../../../..
Expand All @@ -27,8 +28,10 @@ source tensorflow/lite/micro/tools/ci_build/helper_functions.sh
# having build_test but that was removed with #194.

CC=clang readable_run bazel build ... \
--config=ci \
--build_tag_filters=-no_oss
CC=clang readable_run bazel test ... \
--config=ci \
--test_tag_filters=-no_oss --build_tag_filters=-no_oss \
--test_output=errors

Expand Down
4 changes: 4 additions & 0 deletions tensorflow/lite/micro/tools/ci_build/test_bazel_asan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# ==============================================================================

set -e
set -x

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ROOT_DIR=${SCRIPT_DIR}/../../../../..
Expand All @@ -27,8 +28,11 @@ source tensorflow/lite/micro/tools/ci_build/helper_functions.sh
# having build_test but that was removed with #194.

CC=clang readable_run bazel build tensorflow/lite/micro/... \
--config=ci \
--config=asan --build_tag_filters=-no_oss,-noasan

CC=clang readable_run bazel test tensorflow/lite/micro/... \
--config=ci \
--config=asan \
--test_tag_filters=-no_oss,-noasan --build_tag_filters=-no_oss,-noasan \
--test_output=errors
4 changes: 4 additions & 0 deletions tensorflow/lite/micro/tools/ci_build/test_bazel_msan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# ==============================================================================

set -e
set -x

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ROOT_DIR=${SCRIPT_DIR}/../../../../..
Expand All @@ -27,8 +28,11 @@ source tensorflow/lite/micro/tools/ci_build/helper_functions.sh
# having build_test but that was removed with #194.

CC=clang readable_run bazel build tensorflow/lite/micro/... \
--config=ci \
--config=msan --build_tag_filters=-no_oss,-nomsan

CC=clang readable_run bazel test tensorflow/lite/micro/... \
--config=ci \
--config=msan \
--test_tag_filters=-no_oss,-nomsan --build_tag_filters=-no_oss,-nomsan \
--test_output=errors
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# ==============================================================================

set -e
set -x

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ROOT_DIR=${SCRIPT_DIR}/../../../../..
Expand All @@ -23,4 +24,5 @@ cd "${ROOT_DIR}"
source tensorflow/lite/micro/tools/ci_build/helper_functions.sh

readable_run bazel test tensorflow/lite/tools/... \
--config=ci \
--test_output=errors
Loading