| 1 |
add_test_setup('default', |
| 2 |
exclude_suites: ['integration_long'], |
| 3 |
is_default: true) |
| 4 |
|
| 5 |
unity_sub = subproject('unity') |
| 6 |
unity_dep = unity_sub.get_variable('unity_dep') |
| 7 |
|
| 8 |
test_deps = [unity_dep] + httpdirfs_deps |
| 9 |
|
| 10 |
test_util = executable('test_util', |
| 11 |
sources: ['test_util.c'], |
| 12 |
link_with: httpdirfs_lib, |
| 13 |
dependencies: test_deps, |
| 14 |
include_directories: include_directories('../src'), |
| 15 |
c_args: c_args |
| 16 |
) |
| 17 |
test('test_util', test_util, suite: 'unit_test') |
| 18 |
|
| 19 |
test_cache = executable('test_cache', |
| 20 |
sources: ['test_cache.c'], |
| 21 |
link_with: httpdirfs_lib, |
| 22 |
dependencies: test_deps, |
| 23 |
include_directories: include_directories('../src'), |
| 24 |
c_args: c_args |
| 25 |
) |
| 26 |
test('test_cache', test_cache, suite: 'unit_test') |
| 27 |
|
| 28 |
test_config = executable('test_config', |
| 29 |
sources: ['test_config.c'], |
| 30 |
link_with: httpdirfs_lib, |
| 31 |
dependencies: test_deps, |
| 32 |
include_directories: include_directories('../src'), |
| 33 |
c_args: c_args |
| 34 |
) |
| 35 |
test('test_config', test_config, suite: 'unit_test') |
| 36 |
|
| 37 |
test_link = executable('test_link', |
| 38 |
sources: ['test_link.c'], |
| 39 |
link_with: httpdirfs_lib, |
| 40 |
dependencies: test_deps, |
| 41 |
include_directories: include_directories('../src'), |
| 42 |
c_args: c_args |
| 43 |
) |
| 44 |
test('test_link', test_link, suite: 'unit_test') |
| 45 |
|
| 46 |
# Integration test (requires FUSE and Python 3) |
| 47 |
integration_test = find_program('integration/run_integration_test.sh', |
| 48 |
required: false) |
| 49 |
if integration_test.found() |
| 50 |
test('integration_short', |
| 51 |
integration_test, |
| 52 |
args: ['--short', httpdirfs], |
| 53 |
timeout: 300, |
| 54 |
is_parallel: false, |
| 55 |
suite: 'integration_short') |
| 56 |
|
| 57 |
test('integration_long', |
| 58 |
integration_test, |
| 59 |
args: ['--long', httpdirfs], |
| 60 |
timeout: 900, |
| 61 |
is_parallel: false, |
| 62 |
suite: 'integration_long') |
| 63 |
endif |