rust-cryptoki icon indicating copy to clipboard operation
rust-cryptoki copied to clipboard

Document test dependencies/setup in contributor docs

Open vkkoskie opened this issue 3 years ago • 1 comments

This project's tests rely on external libraries not contained within it. Testing changes from a development environment other than github CI is not possible without additional setup work, which is not documented.

It is possible to extract setup details from the correct setup from the contents of .github but that's just as likely to be a deterrent. It's also specific to ubuntu, which leaves users on other platforms guessing at how to translate.

Possible solutions in order of preference:

  • The entirety of test dependencies are contained in the project and work "out of the box". This may not be possible due to the licensing constraints of SoftHSM, but it's the ideal to be aiming for.
  • The project provides test setup scripts to collect test dependencies post-clone.
  • The project provides detailed documentation of how to set up test dependencies

In both of the latter two cases, you'd want to provide a space that could accumulate and organize that content for an expanding assortment of platforms. You may also also want to create a specific, in-tree location for them that can be listed in .gitignore to prevent them from accidentally being committed.

vkkoskie avatar Dec 03 '21 21:12 vkkoskie

Sub-issue and suggestion:

Since rust 1.54, cargo has supported the CARGO_TARGET_TMPDIR variable, which points to a general-purpose scratch location somewhere inside the target directory that build artifacts are written to. It can be used in place of /tmp for defining SOFTHSM2_CONF's location.

vkkoskie avatar Dec 03 '21 21:12 vkkoskie