[llvm-branch-commits] [mlir] [MLIR][Standalone] test Standalone against install distributions (PR #157944)

2025-09-12 Thread Christopher Bate via llvm-branch-commits

christopherbate wrote:

I don't fully understand the rationale for adding this test. I followed the 
links, and it seems to stem from [this 
comment](https://github.com/llvm/llvm-project/pull/157583#issuecomment-3274164357).
 But the relationship between that failure and this test is not clear to me. 
What does Standalone project have to do with testing `install-distributions`?

Wouldn't the failure mentioend by @ftynse be caught by exercising 
`install-distributions` in any normal CI test? 

The test appears to be launching a CMake configuration process operating on the 
same build/source directory, and then also a nested build command...but the 
parent process is itself a cmake build command in the same build directory. Is 
such a thing even supported by CMake? Seems like the result of doing that would 
be undefined behavior.

https://github.com/llvm/llvm-project/pull/157944
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [mlir] [MLIR][Standalone] test Standalone against install distributions (PR #157944)

2025-09-12 Thread Christopher Bate via llvm-branch-commits

christopherbate wrote:

> The existing Standalone test already performs a nested build command

That test is using configure/build in a different build directory. Yes, it is 
nested in the existing one, but it is a new, temporary build directory.

Existing test does something like this:

- Parent CMake: SrcDir: `llvm-project/llvm`, BuildDir: `/path/to/build/`
- Subprocess CMake: SrcDir: `llvm-project/mlir/Examples/Standalone`, BuildDir: 
`/path/to/build/.../some-temprorary-test-dir`

Your new test (based on my understanding of the path expansions):

- Parent CMake: SrcDir: `llvm-project/llvm`, BuildDir: `/path/to/build/`
- Subprocess 1 CMake (llvm-build): SrcDir: `llvm-project/llvm`, BuildDir: 
`/path/to/build/`
- Subprocess 2 CMake (standalone): SrcDir: 
`llvm-project/mlir/Examples/Standalone`, BuildDir: 
`/path/to/build/.../some-temprorary-test-dir`

The fact that Subprocess 1 CMake and Parent CMake have identical build 
directories seems particularly problematic. 


https://github.com/llvm/llvm-project/pull/157944
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [mlir] [MLIR][Standalone] test Standalone against install distributions (PR #157944)

2025-09-13 Thread Christopher Bate via llvm-branch-commits


@@ -65,6 +65,12 @@ if (MLIR_INCLUDE_INTEGRATION_TESTS)
 
 endif()
 
+option(MLIR_RUN_STANDALONE_INSTALL_TESTS "Run Standalone example install 
tests." ON)
+if(MLIR_RUN_STANDALONE_INSTALL_TESTS AND "${CMAKE_INSTALL_PREFIX}" STREQUAL "")
+  message(WARNING "Standalone example install tests will install into root!\

christopherbate wrote:

Shouldn't any potential to write outside the build directory in a test by a 
FATAL_ERROR not a WARNING?

https://github.com/llvm/llvm-project/pull/157944
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [mlir] release/21.x: [mlir][cmake] Fix mlir target export (#153341) (PR #155856)

2025-08-28 Thread Christopher Bate via llvm-branch-commits

https://github.com/christopherbate approved this pull request.

LGTM

https://github.com/llvm/llvm-project/pull/155856
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [mlir] [MLIR][Standalone] test Standalone against install distributions (PR #157944)

2025-09-17 Thread Christopher Bate via llvm-branch-commits

christopherbate wrote:

> Yes but then you're proposing we should add to the monolithic scripts an 
> invocation of install-distributions? That seems fine too.

I'm not familiar enough with the infra to know where tests for `install` or 
`install-distribution` should go. @joker-eph do you have a recommendation? 

Sounds like we're aligned that this Standalone/LIT location isn't the right 
place, @makslevental ?

https://github.com/llvm/llvm-project/pull/157944
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits