This is an automated email from the ASF dual-hosted git repository.

kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new 791660cb9a GH-45779: [C++] Add testing directory to Meson 
configuration (#45780)
791660cb9a is described below

commit 791660cb9a7a2866cd29f272f38e21314b576d9d
Author: William Ayd <[email protected]>
AuthorDate: Fri Mar 14 01:55:04 2025 -0400

    GH-45779: [C++] Add testing directory to Meson configuration (#45780)
    
    ### Rationale for this change
    
    This adds the testing directory to the Meson configuration
    
    ### What changes are included in this PR?
    
    Adds a meson.build configuration in the testing directory
    
    ### Are these changes tested?
    
    Yes
    
    ### Are there any user-facing changes?
    
    No
    
    * GitHub Issue: #45779
    
    Authored-by: Will Ayd <[email protected]>
    Signed-off-by: Sutou Kouhei <[email protected]>
---
 cpp/meson.build                   |  1 +
 cpp/src/arrow/meson.build         |  2 ++
 cpp/src/arrow/testing/meson.build | 63 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 66 insertions(+)

diff --git a/cpp/meson.build b/cpp/meson.build
index f855f6218b..e5a30b0eb4 100644
--- a/cpp/meson.build
+++ b/cpp/meson.build
@@ -56,6 +56,7 @@ if git_description == ''
     git_description = run_command('git', 'describe', '--tags', check: 
false).stdout().strip()
 endif
 
+needs_filesystem = false
 needs_integration = false
 needs_tests = get_option('tests')
 needs_ipc = get_option('ipc') or needs_tests
diff --git a/cpp/src/arrow/meson.build b/cpp/src/arrow/meson.build
index d367540645..732d20d0cd 100644
--- a/cpp/src/arrow/meson.build
+++ b/cpp/src/arrow/meson.build
@@ -438,4 +438,6 @@ pkg.generate(
     },
 )
 
+subdir('testing')
+
 subdir('util')
diff --git a/cpp/src/arrow/testing/meson.build 
b/cpp/src/arrow/testing/meson.build
new file mode 100644
index 0000000000..d1ebfe2edd
--- /dev/null
+++ b/cpp/src/arrow/testing/meson.build
@@ -0,0 +1,63 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+install_headers(
+    [
+        'async_test_util.h',
+        'builder.h',
+        'executor_util.h',
+        'extension_type.h',
+        'fixed_width_test_util.h',
+        'future_util.h',
+        'generator.h',
+        'gtest_compat.h',
+        'gtest_util.h',
+        'matchers.h',
+        'math.h',
+        'pch.h',
+        'process.h',
+        'random.h',
+        'uniform_real.h',
+        'util.h',
+        'visibility.h',
+    ],
+)
+
+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']},
+    }
+
+    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
+endif

Reply via email to