Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cram test the conversion shell scripts #79

Open
bufordrat opened this issue Jul 5, 2023 · 0 comments
Open

Cram test the conversion shell scripts #79

bufordrat opened this issue Jul 5, 2023 · 0 comments
Assignees

Comments

@bufordrat
Copy link
Contributor

Now that we have determined how run basic cram tests, the next step is to write some. For this issue, we'll focus on creating cram tests for our conversion shell scripts.

For each of the shell scripts in conversion-scripts, write a test which:

  • runs the script
  • checks that the exit status is 0
  • runs the file command on the output of the script to determine that the output is of the correct file format

Adding conversion-scripts as a cram dependency

Since dune creates a .sandbox directory to run cram tests in whenever they are run, we will need to figure out how to get dune to copy conversion-scripts into the .sandbox directory as well. Configuring dune is always a funky adventure, but it seems likely that this will involve using the deps option in the stanza that defines the cram tests in cram-tests/dune.

For more information:
https://dune.readthedocs.io/en/stable/tests.html#test-options

Once dune adds the conversion-scripts as a dependency within dune, it may also be necessary to add that directory to the path within the sandboxed environment? One simple thing we could try is to just add that directory inside the cram test, etc.

$ PATH=../conversion-scripts/:$PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants