kou commented on code in PR #45909:
URL: https://github.com/apache/arrow/pull/45909#discussion_r2011074495
##########
cpp/src/arrow/testing/meson.build:
##########
@@ -38,27 +38,25 @@ install_headers(
subdir: 'arrow/testing',
)
-if needs_tests
- testing_tests = {
- 'arrow-generator-test': {'sources': ['generator_test.cc']},
- 'arrow-gtest-util-test': {'sources': ['gtest_util_test.cc']},
- 'arrow-random-test': {'sources': ['random_test.cc']},
- }
+testing_tests = {
+ 'arrow-generator-test': {'sources': ['generator_test.cc']},
+ 'arrow-gtest-util-test': {'sources': ['gtest_util_test.cc']},
+ 'arrow-random-test': {'sources': ['random_test.cc']},
+}
- foreach key, val : testing_tests
- exc = executable(
- key,
- sources: val['sources'],
- dependencies: [arrow_test_dep, val.get('dependencies', [])],
- )
- test(key, exc)
- endforeach
+foreach key, val : testing_tests
+ exc = executable(
+ key,
+ sources: val['sources'],
+ dependencies: [arrow_test_dep, val.get('dependencies', [])],
+ )
+ test(key, exc)
+endforeach
- if needs_filesystem
- library(
- 'arrow-filesystem-example',
- sources: ['examplefs.cc'],
- dependencies: [arrow_dep, gtest_main_dep],
- )
- endif
+if needs_tests and needs_filesystem
Review Comment:
It's intentional. We can use this as a loadable filesystem.
##########
cpp/src/arrow/testing/meson.build:
##########
@@ -38,27 +38,25 @@ install_headers(
subdir: 'arrow/testing',
)
-if needs_tests
- testing_tests = {
- 'arrow-generator-test': {'sources': ['generator_test.cc']},
- 'arrow-gtest-util-test': {'sources': ['gtest_util_test.cc']},
- 'arrow-random-test': {'sources': ['random_test.cc']},
- }
+testing_tests = {
+ 'arrow-generator-test': {'sources': ['generator_test.cc']},
+ 'arrow-gtest-util-test': {'sources': ['gtest_util_test.cc']},
+ 'arrow-random-test': {'sources': ['random_test.cc']},
+}
- foreach key, val : testing_tests
- exc = executable(
- key,
- sources: val['sources'],
- dependencies: [arrow_test_dep, val.get('dependencies', [])],
- )
- test(key, exc)
- endforeach
+foreach key, val : testing_tests
+ exc = executable(
+ key,
+ sources: val['sources'],
+ dependencies: [arrow_test_dep, val.get('dependencies', [])],
+ )
+ test(key, exc)
+endforeach
- if needs_filesystem
- library(
- 'arrow-filesystem-example',
- sources: ['examplefs.cc'],
- dependencies: [arrow_dep, gtest_main_dep],
- )
- endif
+if needs_tests and needs_filesystem
+ library(
Review Comment:
We need to use `shared_module()` not `library()`.
##########
cpp/src/arrow/meson.build:
##########
@@ -459,24 +463,27 @@ if needs_ipc
}
endif
-if needs_tests
- foreach key, val : arrow_tests
- exc = executable(
- key,
- sources: val['sources'],
- dependencies: [arrow_test_dep, val.get('dependencies', [])],
- )
- test(key, exc)
- endforeach
-endif
+foreach key, val : arrow_tests
+ exc = executable(
+ key,
+ sources: val['sources'],
+ dependencies: [arrow_test_dep, val.get('dependencies', [])],
+ )
+ test(key, exc)
+endforeach
if needs_benchmarks
benchmark_dep = dependency(
'benchmark',
default_options: {'tests': 'disabled'},
)
+
+ arrow_benchmark_dep = declare_dependency(
+ link_with: [arrow_test_lib],
+ dependencies: [arrow_dep, gtest_main_dep, benchmark_dep],
Review Comment:
Can we use `benchmark_main` instead of `gtest_main` for benchmark?
##########
cpp/src/arrow/testing/meson.build:
##########
@@ -38,27 +38,25 @@ install_headers(
subdir: 'arrow/testing',
)
-if needs_tests
- testing_tests = {
- 'arrow-generator-test': {'sources': ['generator_test.cc']},
- 'arrow-gtest-util-test': {'sources': ['gtest_util_test.cc']},
- 'arrow-random-test': {'sources': ['random_test.cc']},
- }
+testing_tests = {
+ 'arrow-generator-test': {'sources': ['generator_test.cc']},
+ 'arrow-gtest-util-test': {'sources': ['gtest_util_test.cc']},
+ 'arrow-random-test': {'sources': ['random_test.cc']},
+}
- foreach key, val : testing_tests
- exc = executable(
- key,
- sources: val['sources'],
- dependencies: [arrow_test_dep, val.get('dependencies', [])],
- )
- test(key, exc)
- endforeach
+foreach key, val : testing_tests
+ exc = executable(
+ key,
+ sources: val['sources'],
+ dependencies: [arrow_test_dep, val.get('dependencies', [])],
+ )
+ test(key, exc)
+endforeach
- if needs_filesystem
- library(
- 'arrow-filesystem-example',
- sources: ['examplefs.cc'],
- dependencies: [arrow_dep, gtest_main_dep],
- )
- endif
+if needs_tests and needs_filesystem
+ library(
+ 'arrow-filesystem-example',
+ sources: ['examplefs.cc'],
+ dependencies: [arrow_dep, gtest_main_dep],
Review Comment:
```suggestion
dependencies: [arrow_dep, gtest_dep],
```
--
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]