@@ -131,20 +131,22 @@ libmount_test_src_override = {
131
131
' debug' : ' init' ,
132
132
}
133
133
134
- foreach libmount_test : libmount_tests
135
- test_name = ' test_mount_' + libmount_test
136
- exe = executable (
137
- test_name,
138
- ' src/' + libmount_test_src_override.get(libmount_test, libmount_test) + ' .c' ,
139
- include_directories : [dir_include, dir_libblkid],
140
- link_with : [lib__mount, lib_common, lib_blkid_static],
141
- dependencies : lib__mount_deps,
142
- c_args : [' -DTEST_PROGRAM' ],
143
- )
144
- # the test-setup expects the helpers in the toplevel build-directory
145
- link = meson .project_build_root() / test_name
146
- run_command (' ln' , ' -srf' , exe.full_path(), link,
147
- check : true )
148
- endforeach
134
+ if program_tests
135
+ foreach libmount_test : libmount_tests
136
+ test_name = ' test_mount_' + libmount_test
137
+ exe = executable (
138
+ test_name,
139
+ ' src/' + libmount_test_src_override.get(libmount_test, libmount_test) + ' .c' ,
140
+ include_directories : [dir_include, dir_libblkid],
141
+ link_with : [lib__mount, lib_common, lib_blkid_static],
142
+ dependencies : lib__mount_deps,
143
+ c_args : [' -DTEST_PROGRAM' ],
144
+ )
145
+ # the test-setup expects the helpers in the toplevel build-directory
146
+ link = meson .project_build_root() / test_name
147
+ run_command (' ln' , ' -srf' , exe.full_path(), link,
148
+ check : true )
149
+ endforeach
150
+ endif
149
151
150
152
subdir (' python' )
0 commit comments