meson.build 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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: 60)
  36. test('adv-socat', find_program('adv-socat'), env: env, timeout: 60)
  37. test('rec-standalone', find_program('rec-standalone'), env: env, timeout: 60)
  38. test('rec-socat', find_program('rec-socat'), env: env)
  39. test('test-keys', test_keys, env: env, timeout: 60)
  40. # vim:set ts=2 sw=2 et: