lowRISC / opentitan

OpenTitan: Open source silicon root of trust
https://www.opentitan.org
Apache License 2.0
2.58k stars 777 forks source link

[bazel] build and test failing on master #12346

Closed drewmacrae closed 2 years ago

drewmacrae commented 2 years ago

I'm seeing a failure on a doc-only PR this morning. IDK if it's flakiness or a bug in the master branch

drewmacrae commented 2 years ago

Looks like this is an issue in the master branch and not in the PR.

(02:24:29) ERROR: /home/vsts/work/1/s/sw/device/tests/BUILD:916:19: Compiling sw/device/tests/rstmgr_alert_info_test.c failed: (Exit 1): gcc failed: error executing command 
  (cd /home/vsts/.cache/bazel/_bazel_vsts/5c27df7f718ab35828b0e0cfe0993663/sandbox/linux-sandbox/1854/execroot/lowrisc_opentitan && \
  exec env - \
    PATH=/home/vsts/.cache/bazelisk/downloads/bazelbuild/bazel-5.1.1-linux-x86_64/bin:/home/vsts/.cargo/bin:/tools/verible/bin:/home/vsts/.local/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/vsts/.local/bin:/opt/pipx_bin:/home/vsts/.cargo/bin:/home/vsts/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/vsts/.dotnet/tools:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin \
    PWD=/proc/self/cwd \
  external/bazel_embedded/toolchains/lowrisc_toolchain_rv32imc/clang_wrappers/nix/gcc -MD -MF bazel-out/k8-fastbuild-ST-97f470ee3b14/bin/sw/device/tests/_objs/rstmgr_alert_info_test_prog_sim_verilator/rstmgr_alert_info_test.d '-frandom-seed=bazel-out/k8-fastbuild-ST-97f470ee3b14/bin/sw/device/tests/_objs/rstmgr_alert_info_test_prog_sim_verilator/rstmgr_alert_info_test.o' -iquote . -iquote bazel-out/k8-fastbuild-ST-97f470ee3b14/bin -iquote external/freertos -iquote bazel-out/k8-fastbuild-ST-97f470ee3b14/bin/external/freertos -iquote external/bazel_tools -iquote bazel-out/k8-fastbuild-ST-97f470ee3b14/bin/external/bazel_tools -Ibazel-out/k8-fastbuild-ST-97f470ee3b14/bin/hw/top_earlgrey -Ibazel-out/k8-fastbuild-ST-97f470ee3b14/bin/hw/ip/aon_timer/data -Ibazel-out/k8-fastbuild-ST-97f470ee3b14/bin/hw/ip/i2c/data -Ibazel-out/k8-fastbuild-ST-97f470ee3b14/bin/hw/ip/otp_ctrl/data -Ibazel-out/k8-fastbuild-ST-97f470ee3b14/bin/hw/top_earlgrey/ip/pwrmgr/data/autogen -Ibazel-out/k8-fastbuild-ST-97f470ee3b14/bin/hw/top_earlgrey/ip/rstmgr/data/autogen -Ibazel-out/k8-fastbuild-ST-97f470ee3b14/bin/hw/ip/spi_host/data -Ibazel-out/k8-fastbuild-ST-97f470ee3b14/bin/hw/ip/uart/data -Ibazel-out/k8-fastbuild-ST-97f470ee3b14/bin/hw/ip/rv_timer/data -isystem sw/device/lib/testing/test_framework -isystem bazel-out/k8-fastbuild-ST-97f470ee3b14/bin/sw/device/lib/testing/test_framework -isystem external/freertos/include -isystem bazel-out/k8-fastbuild-ST-97f470ee3b14/bin/external/freertos/include -isystem external/freertos/portable/GCC/RISC-V -isystem bazel-out/k8-fastbuild-ST-97f470ee3b14/bin/external/freertos/portable/GCC/RISC-V '-Werror=date-time' -nostdinc '' -isystem external/bazel_embedded_upstream_toolchain -isystemexternal/com_lowrisc_toolchain_rv32imc_compiler/riscv32-unknown-elf/include -isystemexternal/com_lowrisc_toolchain_rv32imc_compiler/lib/clang/11.0.0/include -isystemexternal/com_lowrisc_toolchain_rv32imc_compiler/riscv32-unknown-elf/include -isystemexternal/com_lowrisc_toolchain_rv32imc_compiler/lib/clang/11.0.0/include -ffunction-sections -fdata-sections '-march=rv32imc' '-mabi=ilp32' '-mcmodel=medany' -mlittle-endian -O -ffreestanding -fno-common '-std=c11' -nostdlib -ffreestanding -c sw/device/tests/rstmgr_alert_info_test.c -o bazel-out/k8-fastbuild-ST-97f470ee3b14/bin/sw/device/tests/_objs/rstmgr_alert_info_test_prog_sim_verilator/rstmgr_alert_info_test.o)
# Configuration: e5da537be03ae6c27fa764ff400bccc29ddfed1a1ce423f1af7e3e11d6a54bbc
# Execution platform: @local_config_platform//:host

Use --sandbox_debug to see verbose messages from the sandbox
sw/device/tests/rstmgr_alert_info_test.c:21:10: fatal error: 'sw/device/lib/testing/check.h' file not found
#include "sw/device/lib/testing/check.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
(02:24:29) [2,034 / 2,043] 2 / 65 tests;  1 action; last test: ..._parser_test
    Action .../test_rom/test_rom_test_prog_sim_dv.64.vmem; 0s remote-cache

missing dependency is unlikely to be caused by flakiness.

drewmacrae commented 2 years ago

I'm seeing failing batch CI runs starting here https://dev.azure.com/lowrisc/opentitan/_build/results?buildId=77964&view=results

drewmacrae commented 2 years ago

This is a merge skew issue, https://cs.opensource.google/opentitan/opentitan/+/09d4d0174198e85a9eec032c673ee8fe5c11fe28 moved sw/device/lib/testing/check.h and a test was added that depended on it