Skip to content

[llvm][Docs] Make it clear where lit test files live #124121

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

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

DavidSpickett
Copy link
Collaborator

@DavidSpickett DavidSpickett commented Jan 23, 2025

As someone on Discord was understandably confused because the build directory does contain folder structures that look remarkably like the source directory.

I used this page to explain it but realised that this must be from when llvm was a separate repository. So <user home>/llvm probably was a common path.

Now it's in llvm-project. So make that obvious in the instructions.

As someone on Discord was understandably confused because the
build directory does contain folder structures that look
remarkably like the source directory.

I used this page to explain it but realised that this must
be from when llvm was a separate repository. So <user home>/llvm
probably was a common path.

Now it's in llvm-project. So make that obvious in the instructions.
@llvmbot
Copy link
Member

llvmbot commented Jan 23, 2025

@llvm/pr-subscribers-testing-tools

Author: David Spickett (DavidSpickett)

Changes

As someone on Discord was understandably confused because the build directory does contain folder structures that look remarkably like the source directory.

I used this page to explain it but realised that this must be from when llvm was a separate repository. So <user home>/llvm probably was a common path.

Now it's in llvm-project. So make that obvious in the instructions.


Full diff: https://github.com/llvm/llvm-project/pull/124121.diff

1 Files Affected:

  • (modified) llvm/docs/TestingGuide.rst (+7-3)
diff --git a/llvm/docs/TestingGuide.rst b/llvm/docs/TestingGuide.rst
index 08617933519fdb..b6dda6a7324056 100644
--- a/llvm/docs/TestingGuide.rst
+++ b/llvm/docs/TestingGuide.rst
@@ -167,13 +167,17 @@ script which is built as part of LLVM. For example, to run the
 
 .. code-block:: bash
 
-    % llvm-lit ~/llvm/test/Integer/BitPacked.ll
+    % llvm-lit <path to llvm-project>/llvm/test/Integer/BitPacked.ll
 
-or to run all of the ARM CodeGen tests:
+.. note::
+   The test files are in the ``llvm-project`` directory, not the directory you
+   are building LLVM in.
+
+Or you can run a whole folder of tests. To run all of the ARM CodeGen tests:
 
 .. code-block:: bash
 
-    % llvm-lit ~/llvm/test/CodeGen/ARM
+    % llvm-lit <path to llvm-project>/llvm/test/CodeGen/ARM
 
 The regression tests will use the Python psutil module only if installed in a
 **non-user** location. Under Linux, install with sudo or within a virtual

Copy link
Member

@junlarsen junlarsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. There was also some confusion on regression vs unittest, but I think the docs explain that well enough already.

@DavidSpickett DavidSpickett merged commit 97df741 into llvm:main Jan 24, 2025
11 checks passed
@DavidSpickett DavidSpickett deleted the llvm-dir branch January 24, 2025 08:29
@llvm-ci
Copy link
Collaborator

llvm-ci commented Jan 24, 2025

LLVM Buildbot has detected a new failure on builder flang-aarch64-dylib running on linaro-flang-aarch64-dylib while building llvm at step 5 "build-unified-tree".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/50/builds/9342

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
534.066 [1538/10/5273] Building CXX object tools/mlir/lib/Dialect/NVGPU/Utils/CMakeFiles/obj.MLIRNVGPUUtils.dir/MMAUtils.cpp.o
534.067 [1538/9/5274] Building CXX object tools/mlir/lib/Dialect/PDLInterp/IR/CMakeFiles/obj.MLIRPDLInterpDialect.dir/PDLInterp.cpp.o
534.070 [1538/8/5275] Building CXX object tools/mlir/lib/Dialect/NVGPU/Transforms/CMakeFiles/obj.MLIRNVGPUTransforms.dir/CreateAsyncGroups.cpp.o
534.122 [1538/7/5276] Building CXX object tools/mlir/lib/Dialect/PDL/IR/CMakeFiles/obj.MLIRPDLDialect.dir/PDLTypes.cpp.o
534.125 [1538/6/5277] Building CXX object tools/mlir/lib/Dialect/MLProgram/Transforms/CMakeFiles/obj.MLIRMLProgramTransforms.dir/BufferizableOpInterfaceImpl.cpp.o
534.127 [1538/5/5278] Building CXX object tools/mlir/test/lib/Dialect/ArmSME/CMakeFiles/MLIRArmSMETestPasses.dir/TestLowerToArmSME.cpp.o
534.129 [1538/4/5279] Building CXX object tools/mlir/lib/Dialect/OpenMP/CMakeFiles/obj.MLIROpenMPDialect.dir/IR/OpenMPDialect.cpp.o
534.130 [1538/3/5280] Building CXX object tools/mlir/lib/Dialect/Polynomial/IR/CMakeFiles/obj.MLIRPolynomialDialect.dir/PolynomialAttributes.cpp.o
534.133 [1538/2/5281] Building CXX object tools/mlir/lib/Dialect/PDL/IR/CMakeFiles/obj.MLIRPDLDialect.dir/PDL.cpp.o
551.654 [1538/1/5282] Building CXX object tools/mlir/test/lib/IR/CMakeFiles/MLIRTestIR.dir/TestSymbolUses.cpp.o
FAILED: tools/mlir/test/lib/IR/CMakeFiles/MLIRTestIR.dir/TestSymbolUses.cpp.o 
/usr/local/bin/c++ -DGTEST_HAS_RTTI=0 -DMLIR_INCLUDE_TESTS -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/tools/mlir/test/lib/IR -I/home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/mlir/test/lib/IR -I/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/tools/mlir/include -I/home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/mlir/include -I/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/include -I/home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/llvm/include -I/home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/mlir/test/lib/IR/../Dialect/Test -I/home/tcwg-buildbot/worker/flang-aarch64-dylib/build/tools/mlir/test/lib/IR/../Dialect/Test -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wundef -Werror=mismatched-tags -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT tools/mlir/test/lib/IR/CMakeFiles/MLIRTestIR.dir/TestSymbolUses.cpp.o -MF tools/mlir/test/lib/IR/CMakeFiles/MLIRTestIR.dir/TestSymbolUses.cpp.o.d -o tools/mlir/test/lib/IR/CMakeFiles/MLIRTestIR.dir/TestSymbolUses.cpp.o -c /home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/mlir/test/lib/IR/TestSymbolUses.cpp
In file included from /home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/mlir/test/lib/IR/TestSymbolUses.cpp:9:
/home/tcwg-buildbot/worker/flang-aarch64-dylib/llvm-project/mlir/test/lib/IR/../Dialect/Test/TestOps.h:148:10: fatal error: 'TestOps.h.inc' file not found
  148 | #include "TestOps.h.inc"
      |          ^~~~~~~~~~~~~~~
1 error generated.
ninja: build stopped: subcommand failed.

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

Successfully merging this pull request may close these issues.

4 participants