meson.build 918 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. sd_activate = find_program(
  18. 'systemd-socket-activate',
  19. 'systemd-activate',
  20. required: false
  21. )
  22. env = environment()
  23. env.prepend('PATH',
  24. join_paths(meson.source_root(), 'src'),
  25. join_paths(meson.build_root(), 'src'),
  26. separator: ':'
  27. )
  28. if sd_activate.found()
  29. env.set('SD_ACTIVATE', sd_activate.path() + ' --inetd')
  30. test('adv', find_program('adv'), env: env, timeout: 60)
  31. test('rec', find_program('rec'), env: env)
  32. endif
  33. test('test-keys', test_keys, env: env, timeout: 60)
  34. # vim:set ts=2 sw=2 et: