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

go/tools/bazel_testing: provide a way to configure C toolchain in tests #2509

Merged
merged 13 commits into from
May 27, 2020

Conversation

jayconrod
Copy link
Contributor

@jayconrod jayconrod commented May 17, 2020

go_bazel_tests that require cgo have been failing on Windows since the
test environment hasn't been passing additional flags needed to
configure the C toolchain on Windows.

This CL adds GO_BAZEL_TEST_BAZELFLAGS, an environment variable to be
set with --test_env, which provides a list of additional flags to
Bazel.

Fixes #2507

go_bazel_tests that require cgo have been failing on Windows since the
test environment hasn't been passing additional flags needed to
configure the C toolchain on Windows.

This CL adds GO_BAZEL_TEST_BAZELFLAGS, an environment variable to be
set with --test_env, which provides a list of additional flags to
Bazel.

Fixes bazelbuild#2507
@jayconrod jayconrod merged commit eddc81f into bazelbuild:master May 27, 2020
@jayconrod jayconrod deleted the fix-windows-ci branch May 27, 2020 21:10
jayconrod pushed a commit that referenced this pull request May 27, 2020
…ts (#2509)

go_bazel_tests that require cgo have been failing on Windows since the
test environment hasn't been passing additional flags needed to
configure the C toolchain on Windows.

This CL adds GO_BAZEL_TEST_BAZELFLAGS, an environment variable to be
set with --test_env, which provides a list of additional flags to
Bazel.

Fixes #2507
@meteorcloudy
Copy link
Member

Looks like this change broke tests on Windows:
https://buildkite.com/bazel/rules-go-golang/builds/2129#eed1c52d-20e1-4990-ac86-0f0f8138e41b

Executing tests from //tests/core/race:race_test
-----------------------------------------------------------------------------
--- FAIL: Test (47.83s)
    --- FAIL: Test/cover_race (15.36s)
        race_test.go:264: running: bazel coverage //:coverrace_test
        race_test.go:272: unexpected build failure: exit status 1
            stderr:
            Loading: 
            Loading: 0 packages loaded
            INFO: Using default value for --instrumentation_filter: "//".
            INFO: Override the above default with --instrumentation_filter
            INFO: Build options --collect_code_coverage, --instrumentation_filter, and --test_timeout have changed, discarding analysis cache.
            Analyzing: target //:coverrace_test (0 packages loaded, 0 targets configured)
            INFO: Analyzed target //:coverrace_test (0 packages loaded, 7044 targets configured).
            INFO: Found 1 test target...
            [0 / 3] [Prepa] BazelWorkspaceStatusAction stable-status.txt
            [9 / 15] [Sched] GoStdlib external/io_bazel_rules_go/stdlib_/pkg
            [9 / 15] GoStdlib external/io_bazel_rules_go/stdlib_/pkg; 1s local
            [9 / 15] GoStdlib external/io_bazel_rules_go/stdlib_/pkg; 10s local
            [20 / 21] [Prepa] Testing //:coverrace_test
            FAIL: //:coverrace_test (see C:/b/4xosdfd5/execroot/__main__/bazel-out/x64_windows-fastbuild-ST-e550172346ce7259f92416ab36072baf4df0deb3e748a2c931fafa98361b25ba/testlogs/coverrace_test/test.log)
            ERROR: C:/b/gmkpsojl/bazel_testing/bazel_go_test/main/BUILD.bazel:59:8: output 'coverrace_test/coverage.dat' was not created
            ERROR: C:/b/gmkpsojl/bazel_testing/bazel_go_test/main/BUILD.bazel:59:8: not all outputs were created or valid
            Target //:coverrace_test up-to-date:
              bazel-out/x64_windows-fastbuild-ST-e550172346ce7259f92416ab36072baf4df0deb3e748a2c931fafa98361b25ba/bin/coverrace_test_/coverrace_test.exe
            INFO: Elapsed time: 15.316s, Critical Path: 14.84s
            INFO: 3 processes: 3 local.
            FAILED: Build did NOT complete successfully
            FAILED: Build did NOT complete successfully

jayconrod pushed a commit to jayconrod/rules_go that referenced this pull request May 28, 2020
Test case was added in bazelbuild#2502. bazelbuild#2509 enabled tests and caused it to
start failing. Skipped for now.

Updates bazelbuild#2518
jayconrod pushed a commit that referenced this pull request May 28, 2020
Test case was added in #2502. #2509 enabled tests and caused it to
start failing. Skipped for now.

Updates #2518
jayconrod pushed a commit that referenced this pull request May 28, 2020
Test case was added in #2502. #2509 enabled tests and caused it to
start failing. Skipped for now.

Updates #2518
@jayconrod
Copy link
Contributor Author

@meteorcloudy #2519 skips the test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows tests that require cross-compilation are failing in CI
3 participants