llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

Test passes on windows with a ninja build but not a Visual Studio build

Open OCHyams opened this issue 5 years ago • 3 comments

Bugzilla Link 51072
Resolution FIXED
Resolved on Aug 17, 2021 23:55
Version trunk
OS Windows NT
CC @dyung,@pogo59

Extended Description

Git revision: main 0da3573a9ef9 (12th July 2021)

The test: clang/test/utils/update_cc_test_checks/check-globals.test

This test passes on windows when run from a ninja build directory, but not from a Visual Studio (2017) one. For the Visual Studio build I get this failure:

# command stderr:
lit.py: D:\dev\opensource-build-clang\tools\clang\test\lit.site.cfg.py:56: fatal: unable to find 'build_mode' parameter, use '--param=build_mode=VALUE'

Repro steps:

  1. Generate build

cmake -G "Visual Studio 15 2017" -A x64 -Thost=x64 -DLLVM_PARALLEL_LINK_JOBS=1 -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_ENABLE_ASSERTIONS=TRUE

  1. Build
  2. Run test

python Release\bin\llvm-lit.py /clang/test/utils/update_cc_test_checks/check-globals.test -v

command stderr:

lit.py: D:\dev\opensource-build-clang\tools\clang\test\lit.site.cfg.py:56: fatal: unable to find 'build_mode' parameter, use '--param=build_mode=VALUE'

error: command failed with exit status: 2

--



Failed Tests (1): Clang :: utils/update_cc_test_checks/check-globals.test

If I build with ninja instead there is no issue:

  1. Generate build In a "x64 Native Tools Command Prompt for VS 2017" console:

cmake -G Ninja -DLLVM_PARALLEL_LINK_JOBS=1 -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_ENABLE_ASSERTIONS=TRUE -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=cl.exe -DCMAKE_C_COMPILER=cl.exe -DCMAKE_ASM_COMPILER=cl.exe -DCMAKE_LINKER=link.exe

  1. Build
  2. Run test

python bin\llvm-lit.py /clang/test/utils/update_cc_test_checks/check-globals.test -v -- Testing: 1 tests, 1 workers -- PASS: Clang :: utils/update_cc_test_checks/check-globals.test (1 of 1)

Testing Time: 3.09s Passed: 1

OCHyams avatar Jul 13 '21 08:07 OCHyams

https://github.com/llvm/llvm-project/commit/5aa0f9cc9ab267803ad7bcfd14c8fd8bbffd82cb

llvmbot avatar Aug 18 '21 06:08 llvmbot

https://reviews.llvm.org/D108085

llvmbot avatar Aug 15 '21 13:08 llvmbot

Reproduces with revision 0391165134fc2d19fd13170d87724c3b7bd7366e Visual C++ 2019

435>Failed Tests (3): 435> Clang :: utils/update_cc_test_checks/check-globals.test 435> Clang :: utils/update_cc_test_checks/global-hex-value-regex.test 435> Clang :: utils/update_cc_test_checks/global-value-regex.test

all three fail with

435>lit.py: C:\build\tools\clang\test\lit.site.cfg.py:58: fatal: unable to find 'build_mode' parameter, use '--param=build_mode=VALUE'

llvmbot avatar Aug 14 '21 15:08 llvmbot