blob: d29bb430e2ff875dab1581a77406bc4d9c4fc95d [file] [log] [blame]
William A. Kennington III245495e2020-02-13 13:07:30 -08001gtests = [
William A. Kennington III458aeae2021-06-14 15:07:16 -07002 'cancel',
William A. Kennington III9a70f4e2021-05-01 17:16:57 -07003 'exception',
William A. Kennington IIIe847ef82018-11-02 17:29:15 -07004 'handle/copyable',
William A. Kennington III7a5e2322018-11-02 17:28:35 -07005 'handle/managed',
William A. Kennington III6c15d9a2022-08-24 13:45:42 -07006 'raw',
William A. Kennington III0bd13702022-08-24 13:33:34 -07007 'signal',
William A. Kennington IIIbff0b0f2018-11-16 19:56:10 -08008 'util/cexec',
William A. Kennington III4ef36e72019-06-27 12:48:59 -07009 'util/string',
William A. Kennington III15982f62019-01-31 14:43:41 -080010]
11
William A. Kennington IIId7acddd2022-07-13 16:41:11 -070012gtest_deps = [
13 stdplus_dep,
William A. Kennington III953de362022-07-13 17:32:55 -070014 gtest_main_dep,
15 gmock_dep,
William A. Kennington IIId7acddd2022-07-13 16:41:11 -070016]
17
William A. Kennington III5a528022021-04-28 12:52:43 -070018if has_dl
19 gtests += [
20 'dl',
21 ]
William A. Kennington IIId7acddd2022-07-13 16:41:11 -070022
23 gtest_deps += [
24 stdplus_dl_dep,
25 ]
William A. Kennington III5a528022021-04-28 12:52:43 -070026elif build_tests.enabled()
27 error('Not testing libdl feature')
28else
29 warning('Not testing libdl feature')
30endif
31
William A. Kennington IIIeac9d472020-08-03 13:57:14 -070032if has_fd
33 gtests += [
34 'fd/dupable',
35 'fd/managed',
William A. Kennington III4f5711c2022-08-12 17:01:53 -070036 'fd/fmt',
William A. Kennington IIIeac9d472020-08-03 13:57:14 -070037 'fd/intf',
38 'fd/impl',
William A. Kennington III9a512c92022-08-12 15:15:55 -070039 'fd/line',
William A. Kennington III891e6a32022-05-17 16:35:03 -070040 'fd/mmap',
William A. Kennington IIIeac9d472020-08-03 13:57:14 -070041 'fd/mock',
42 'fd/ops',
43 ]
William A. Kennington IIId7acddd2022-07-13 16:41:11 -070044
45 gtest_deps += [
46 stdplus_fd_dep,
47 ]
William A. Kennington III45754242021-04-28 12:48:31 -070048elif build_tests.enabled()
49 error('Not testing file descriptor feature')
William A. Kennington IIIeac9d472020-08-03 13:57:14 -070050else
51 warning('Not testing file descriptor feature')
52endif
53
William A. Kennington III5c20da22021-06-18 16:44:55 -070054if has_io_uring
55 gtests += [
56 'io_uring',
57 ]
William A. Kennington IIId7acddd2022-07-13 16:41:11 -070058
59 gtest_deps += [
60 stdplus_io_uring_dep,
61 ]
William A. Kennington III5c20da22021-06-18 16:44:55 -070062elif build_tests.enabled()
63 error('Not testing io_uring feature')
64else
65 warning('Not testing io_uring feature')
66endif
67
William A. Kennington III953de362022-07-13 17:32:55 -070068if has_gtest
69 gtests += [
70 'gtest/tmp',
71 ]
72
73 gtest_deps += [
74 stdplus_gtest_dep,
75 ]
76elif build_tests.enabled()
77 error('Not testing gtest lib feature')
78else
79 warning('Not testing gtest lib feature')
80endif
81
82if gtest_dep.found() and gmock_dep.found()
William A. Kennington III83af3fa2021-01-31 15:22:54 -080083 foreach t : gtests
William A. Kennington III953de362022-07-13 17:32:55 -070084 test(
85 t,
William A. Kennington III2030ea52022-07-19 17:06:39 -070086 run_with_tmp,
William A. Kennington III953de362022-07-13 17:32:55 -070087 env: {'TMPTMPL': 'stdplus-test.XXXXXXXXXX'},
88 args: executable(
89 t.underscorify(), t + '.cpp',
90 build_by_default: false,
91 implicit_include_directories: false,
92 dependencies: gtest_deps))
William A. Kennington III83af3fa2021-01-31 15:22:54 -080093 endforeach
94endif