airborne12 commented on code in PR #68607:
URL: https://github.com/apache/doris/pull/68607#discussion_r4373467587
##########
be/test/storage/index/inverted/snii/snii_golden_corpus_test.cpp:
##########
@@ -454,16 +461,46 @@ Observation observe(const Sample& sample, const
OpenedSample& opened, const Quer
// ---------------------------------------------------------------- fixture
+std::filesystem::path corpus_directory(std::string_view explicit_dir,
std::string_view doris_home,
+ const std::filesystem::path&
source_file) {
+ // Explicit directories select an external corpus or a write destination.
+ if (!explicit_dir.empty()) return std::filesystem::path(explicit_dir);
+ // The runner starts at DORIS_HOME, where build-relative paths such as
../test miss the corpus.
+ const auto source_dir = doris_home.empty() ? source_file.parent_path()
+ :
std::filesystem::path(doris_home) /
Review Comment:
Fixed in `9df654a58784172203aab289d4068f2158cb22f0`.
The finding is valid. BE UT build
[1079928](http://43.132.222.7:8111/viewLog.html?buildId=1079928) reports all
eight files missing below `/root/doris/be/ut_build_ASAN/test/be/test/...`, with
`checked=0`. Compiling the old helper with that runner environment reproduces
the wrong directory.
CMake now passes an absolute `SNII_GOLDEN_CORPUS_DIR` to this test source
only. Default lookup no longer reads `DORIS_HOME` or `__FILE__`; absolute and
relative `SNII_GOLDEN_DIR` overrides remain supported. The default-path test
checks that all eight index/expectation pairs exist.
I compiled the actual helper, sample list, and three path GTests with the
actual CMake source property in an isolated harness. All 18 test executions
pass across repository-root, build-directory, and test-directory working
directories, both with the runner's build-directory `DORIS_HOME` and without
it. Full merged-tree clang-format, FE Checkstyle, English, and BE build-hygiene
checks pass. The harness is limited to path selection; full BE
reader/cache-mode runtime verification remains pending the new CI build.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]