meson.build 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. incdir = include_directories(
  2. join_paths('..', 'src')
  3. )
  4. test_data = configuration_data()
  5. test_data.set('testjwkdir', join_paths(meson.source_root(), 'tests','keys'))
  6. test_keys_c = configure_file(
  7. input: 'test-keys.c.in',
  8. output: 'test-keys.c',
  9. configuration: test_data
  10. )
  11. test_keys = executable('test-keys',
  12. test_keys_c,
  13. 'test-util.c',
  14. dependencies: [jose],
  15. include_directories: incdir
  16. )
  17. socat = find_program(
  18. 'socat',
  19. required: false
  20. )
  21. env = environment()
  22. env.prepend('PATH',
  23. join_paths(meson.source_root(), 'src'),
  24. join_paths(meson.build_root(), 'src'),
  25. join_paths(meson.source_root(), 'tests'),
  26. join_paths(meson.build_root(), 'tests'),
  27. separator: ':'
  28. )
  29. if host_machine.system() == 'freebsd'
  30. env.set('TANG_BSD', '1')
  31. endif
  32. if socat.found()
  33. env.set('SOCAT', socat.path())
  34. endif
  35. test('adv-standalone', find_program('adv-standalone'), env: env, timeout: 360)
  36. test('adv-standalone-endpoint', find_program('adv-standalone-endpoint'), env: env, timeout: 360)
  37. test('adv-socat', find_program('adv-socat'), env: env, timeout: 360)
  38. test('adv-socat-endpoint', find_program('adv-socat-endpoint'), env: env, timeout: 360)
  39. test('rec-standalone', find_program('rec-standalone'), env: env, timeout: 360)
  40. test('rec-standalone-endpoint', find_program('rec-standalone-endpoint'), env: env, timeout: 360)
  41. test('rec-socat', find_program('rec-socat'), env: env, timeout: 360)
  42. test('rec-socat-endpoint', find_program('rec-socat-endpoint'), env: env, timeout: 360)
  43. test('test-keys', test_keys, env: env, timeout: 360)
  44. # vim:set ts=2 sw=2 et: