meson.build 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # We use jq for comparing the pin config in the clevis luks list tests.
  2. jq = find_program('jq', required: false)
  3. common_functions = configure_file(input: 'tests-common-functions.in',
  4. output: 'tests-common-functions',
  5. configuration: luksmeta_data,
  6. install: false
  7. )
  8. env = environment()
  9. env.prepend('PATH',
  10. join_paths(meson.source_root(), 'src'),
  11. join_paths(meson.source_root(), 'src', 'luks'),
  12. join_paths(meson.source_root(), 'src', 'pins', 'sss'),
  13. join_paths(meson.source_root(), 'src', 'pins', 'tang'),
  14. join_paths(meson.source_root(), 'src', 'pins', 'tpm2'),
  15. meson.current_source_dir(),
  16. meson.current_build_dir(),
  17. join_paths(meson.build_root(), 'src'),
  18. join_paths(meson.build_root(), 'src', 'luks'),
  19. join_paths(meson.build_root(), 'src', 'pins', 'sss'),
  20. join_paths(meson.build_root(), 'src', 'pins', 'tang'),
  21. join_paths(meson.build_root(), 'src', 'pins', 'tpm2'),
  22. separator: ':'
  23. )
  24. test('bind-wrong-pass-luks1', find_program('bind-wrong-pass-luks1'), env: env)
  25. test('bind-luks1', find_program('bind-luks1'), env: env)
  26. test('unbind-unbound-slot-luks1', find_program('unbind-unbound-slot-luks1'), env: env)
  27. test('unbind-luks1', find_program('unbind-luks1'), env: env)
  28. test('bind-key-file-non-interactive', find_program('bind-key-file-non-interactive-luks1'), env: env)
  29. test('bind-pass-with-newline', find_program('bind-pass-with-newline-luks1'), env: env)
  30. test('bind-pass-with-newline-keyfile', find_program('bind-pass-with-newline-keyfile-luks1'), env: env)
  31. # Bug #70.
  32. test('bind-already-used-luksmeta-slot', find_program('bind-already-used-luksmeta-slot'), env: env, timeout: 60)
  33. if jq.found()
  34. test('list-recursive-luks1', find_program('list-recursive-luks1'), env: env)
  35. test('list-tang-luks1', find_program('list-tang-luks1'), env: env)
  36. test('list-sss-tang-luks1', find_program('list-sss-tang-luks1'), env: env)
  37. else
  38. warning('Will not run "clevis luks list" tests due to missing jq dependency')
  39. endif
  40. # LUKS2 tests go here, and they get included if we get support for it, based
  41. # on the cryptsetup version.
  42. # Binding LUKS2 takes longer, so timeout is increased for a few tests.
  43. if luksmeta_data.get('OLD_CRYPTSETUP') == '0'
  44. test('bind-wrong-pass-luks2', find_program('bind-wrong-pass-luks2'), env: env)
  45. test('bind-luks2', find_program('bind-luks2'), env: env, timeout: 60)
  46. test('unbind-unbound-slot-luks2', find_program('unbind-unbound-slot-luks2'), env: env)
  47. test('unbind-luks2', find_program('unbind-luks2'), env: env, timeout: 60)
  48. if jq.found()
  49. test('list-recursive-luks2', find_program('list-recursive-luks2'), env: env, timeout: 60)
  50. test('list-tang-luks2', find_program('list-tang-luks2'), env: env, timeout: 60)
  51. test('list-sss-tang-luks2', find_program('list-sss-tang-luks2'), env: env, timeout: 60)
  52. endif
  53. endif