Bazel: Fix broken Bazel tests on Ubuntu 20.04

Created on 23 Sep 2020  路  11Comments  路  Source: bazelbuild/bazel

In order to fully support Bazel on Ubuntu 20.04 LTS, we have to ensure our test suite passes.

The following tests are currently broken on this new platform:

  • [x] //src/test/shell/bazel/android:android_ndk_integration_test
  • [x] //src/test/shell/bazel/android:android_ndk_integration_test_with_head_android_tools
  • [x] //src/test/shell/bazel:python_version_test
  • [x] //src/test/shell/bazel:bazel_coverage_sh_test
  • [x] //src/test/shell/bazel:bazel_coverage_cc_released_test_gcc
  • [x] //src/test/shell/bazel:bazel_coverage_cc_head_test_gcc
  • [x] //src/test/shell/bazel:bazel_cc_code_coverage_test

Buildkite job with logs: https://buildkite.com/bazel/bazel-bazel-github-presubmit/builds/7005

P1 team-XProduct feature request

Most helpful comment

With the new Ubuntu 20.04 Docker containers, all tests pass! 馃帀

All 11 comments

@oquenchil can you please have a look at the coverage failure?

The problem seems to be that the system headers are different and are causing a different coverage report to be generated. I simplified one test to stop using system libraries and this works, I will now do it for the rest of the failing tests.

We're down to three failing targets, although one of them is still coverage related:

https://buildkite.com/bazel/bazel-bazel-github-presubmit/builds/7644

@ahumesky can you please look into the two Android failures?

Regarding the coverage test. What I'm seeing is that the error about the missing file is because it used to be that the generated file's name was simply a.gcno (this is still the case for 18.04) and for 20.04 it's #root#.cache#bazel#_bazel_root#21f93afbcb870cc754d0ec6fe4084f56#sandbox#processwrapper-sandbox#2560#execroot#io_bazel#_tmp#de074246e1edcaf3b1945672957f04d1#workspace#a.gcno.

I can't quite explain why that would happen, the test and the configuration is the same. Did anything change lower level that would cause that?

The fix is easy but I'd like to understand what' s happening.

Ok, I know more now. The newer g++ version is causing this. Trying to find fix now.

Charles and I found the problem over vc (it's related to this #11538). We hadn't tested gcc 9 for coverage on CI before that's why we didn't see it earlier.

The test is relying on the intermediate format to do the comparison with the expected contents. I will fix it by writing it in a way that it's compatible with whichever gcc version being used.

external/androidndk/ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory

Looks like I might be able to fix this by just installing the libncurses5 package in the container! I'll give it a try. :)

With the new Ubuntu 20.04 Docker containers, all tests pass! 馃帀

Thanks for installing the package! I'll send a PR to re-enable the tests.

Was this page helpful?
0 / 5 - 0 ratings