meson.build 996 B

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