Skip to content

Commit 9c1a6a1

Browse files
committed
GH-45779: [C++] Add testing directory to Meson configuration
1 parent 6b66c84 commit 9c1a6a1

File tree

3 files changed

+67
-0
lines changed

3 files changed

+67
-0
lines changed

cpp/meson.build

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ if git_description == ''
5656
git_description = run_command('git', 'describe', '--tags', check: false).stdout().strip()
5757
endif
5858

59+
needs_filesystem = false
5960
needs_integration = false
6061
needs_tests = get_option('tests')
6162
needs_ipc = get_option('ipc') or needs_tests

cpp/src/arrow/meson.build

+2
Original file line numberDiff line numberDiff line change
@@ -456,4 +456,6 @@ pkg.generate(
456456
},
457457
)
458458

459+
subdir('testing')
460+
459461
subdir('util')

cpp/src/arrow/testing/meson.build

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
install_headers(
19+
[
20+
'async_test_util.h',
21+
'builder.h',
22+
'executor_util.h',
23+
'extension_type.h',
24+
'fixed_width_test_util.h',
25+
'future_util.h',
26+
'generator.h',
27+
'gtest_compat.h',
28+
'gtest_util.h',
29+
'matchers.h',
30+
'math.h',
31+
'pch.h',
32+
'process.h',
33+
'random.h',
34+
'uniform_real.h',
35+
'util.h',
36+
'visibility.h',
37+
],
38+
)
39+
40+
if needs_tests
41+
testing_tests = {
42+
'arrow-generator-test': {'sources': ['generator_test.cc']},
43+
'arrow-gtest-util-test': {'sources': ['gtest_util_test.cc']},
44+
'arrow-random-test': {'sources': ['random_test.cc']},
45+
}
46+
47+
foreach key, val : testing_tests
48+
exc = executable(
49+
key,
50+
sources: val['sources'],
51+
dependencies: [arrow_test_dep, val.get('dependencies', [])],
52+
)
53+
test(key, exc)
54+
endforeach
55+
56+
if needs_filesystem
57+
library(
58+
'arrow-filesystem-example',
59+
sources: ['examplefs.cc'],
60+
include_directories: [include_dir],
61+
link_with: [arrow_lib, gtest_main_dep],
62+
)
63+
endif
64+
endif

0 commit comments

Comments
 (0)