-
Notifications
You must be signed in to change notification settings - Fork 69
not: command not found when running tests #2
Copy link
Copy link
Closed
Description
Issue
When running the test suite, any tests which use LLVM's not tool (https://github.com/llvm/llvm-project/tree/cfbb4cc31215d615f605466aef0bcfb42aa9faa5/llvm/utils/not) fail immediately due to the tool not being available. If LIT_USE_INTERNAL_SHELL=1 is used, the tests work, but the proper fix is to ensure the tool is available regardless of shell.
Repro
$ cmake -G Ninja -S . -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER="$(which clang)" \
-DCMAKE_CXX_COMPILER="$(which clang++)" \
-DPython3_EXECUTABLE="$(which python3)" \
-DLLVM_ENABLE_ASSERTIONS=OFF \
-DCUDA_TILE_ENABLE_BINDINGS_PYTHON=ON \
-DCUDA_TILE_ENABLE_CCACHE=ON \
-DCUDA_TILE_ENABLE_TESTING=ON \
-DCUDA_TILE_USE_LLVM_SOURCE_DIR="<Path to local LLVM @ ref cfbb4cc31215d615f605466aef0bcfb42aa9faa5>"
$ cmake --build build
$ LIT_USE_INTERNAL_SHELL=1 cmake --build build --target check-cuda-tile
...
Passed: 40 (100.00%)
$ cmake --build build --target check-cuda-tile
...
********************
FAIL: CUDA_TILE :: Bytecode/unsupportedVersionTest.mlir (29 of 40)
******************** TEST 'CUDA_TILE :: Bytecode/unsupportedVersionTest.mlir' FAILED ********************
Exit Code: 1
Command Output (stderr):
--
not cuda-tile-translate -mlir-to-cudatilebc -no-implicit-module -bytecode-version=12.0 /.../test/Bytecode/unsupportedVersionTest.mlir 2>&1 | /.../build/llvm-project-build/bin/FileCheck /.../test/Bytecode/unsupportedVersionTest.mlir # RUN: at line 1
+ not cuda-tile-translate -mlir-to-cudatilebc -no-implicit-module -bytecode-version=12.0 /.../test/Bytecode/unsupportedVersionTest.mlir
+ /.../build/llvm-project-build/bin/FileCheck /.../test/Bytecode/unsupportedVersionTest.mlir
/.../test/Bytecode/unsupportedVersionTest.mlir:2:11: error: CHECK: expected string not found in input
// CHECK: Invalid argument '12.0': the supported versions are [13.1, 13.1]
^
<stdin>:1:1: note: scanning from here
/.../build/test/Bytecode/Output/unsupportedVersionTest.mlir.script: line 1: not: command not found
^
<stdin>:1:33: note: possible intended match here
/.../build/test/Bytecode/Output/unsupportedVersionTest.mlir.script: line 1: not: command not found
^
Input file: <stdin>
Check file: /.../test/Bytecode/unsupportedVersionTest.mlir
-dump-input=help explains the following input dump.
Input was:
<<<<<<
1: /.../build/test/Bytecode/Output/unsupportedVersionTest.mlir.script: line 1: not: command not found
check:2'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
check:2'1 ? possible intended match
>>>>>>
...
Failed Tests (5):
CUDA_TILE :: Bytecode/invalid/invalid_structure.mlir
CUDA_TILE :: Bytecode/non_tileir_types.mlir
CUDA_TILE :: Bytecode/unsupportedVersionTest.mlir
CUDA_TILE :: Dialect/CudaTile/debuginfo_attr_invalid.mlir
CUDA_TILE :: Dialect/CudaTile/debuginfo_loc_invalid.mlirFix
---
test/CMakeLists.txt | 1 +
test/lit.cfg.py | 1 +
2 files changed, 2 insertions(+)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index ede1906..d3eb340 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -12,6 +12,7 @@ add_subdirectory(CAPI)
set(MLIR_TEST_DEPENDS
FileCheck
+ not
cuda-tile-opt
cuda-tile-translate
${CAPI_TEST_TARGETS}
diff --git a/test/lit.cfg.py b/test/lit.cfg.py
index d39f040..6ded201 100644
--- a/test/lit.cfg.py
+++ b/test/lit.cfg.py
@@ -49,6 +49,7 @@ else:
tools = [
"cuda-tile-opt",
"FileCheck",
+ "not",
]
llvm_config.add_tool_substitutions(tools, tool_dirs)
--
2.43.0Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels