You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
The text was updated successfully, but these errors were encountered:
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:file
command on the output of the script to determine that the output is of the correct file formatAdding
conversion-scripts
as a cram dependencySince
dune
creates a.sandbox
directory to run cram tests in whenever they are run, we will need to figure out how to getdune
to copyconversion-scripts
into the.sandbox
directory as well. Configuringdune
is always a funky adventure, but it seems likely that this will involve using thedeps
option in the stanza that defines the cram tests incram-tests/dune
.For more information:
https://dune.readthedocs.io/en/stable/tests.html#test-options
Once
dune
adds theconversion-scripts
as a dependency withindune
, 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.The text was updated successfully, but these errors were encountered: