-
Notifications
You must be signed in to change notification settings - Fork 80
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
Support loading the test suite from the file system #358
Comments
mjambon
changed the title
Support loading the test suite from the filesystem
Support loading the test suite from the file system
Sep 17, 2022
mjambon
added a commit
to semgrep/semgrep
that referenced
this issue
Sep 17, 2022
without requiring test data. The issue was raised at mirage/alcotest#358
5 tasks
mjambon
added a commit
to semgrep/semgrep
that referenced
this issue
Sep 19, 2022
* Fix incorrect stripping of '$' from the regexp '\$' (literal dollar sign) * Add a workaround to allow querying the test program for '--help' without requiring test data. The issue was raised at mirage/alcotest#358 * Update changelog * Add link to alcotest issue * Clarify comment * Rephrase
brandonspark
pushed a commit
to semgrep/semgrep
that referenced
this issue
Sep 22, 2022
* Fix incorrect stripping of '$' from the regexp '\$' (literal dollar sign) * Add a workaround to allow querying the test program for '--help' without requiring test data. The issue was raised at mirage/alcotest#358 * Update changelog * Add link to alcotest issue * Clarify comment * Rephrase
brandonspark
pushed a commit
to semgrep/semgrep
that referenced
this issue
Sep 22, 2022
* Fix incorrect stripping of '$' from the regexp '\$' (literal dollar sign) * Add a workaround to allow querying the test program for '--help' without requiring test data. The issue was raised at mirage/alcotest#358 * Update changelog * Add link to alcotest issue * Clarify comment * Rephrase
brandonspark
pushed a commit
to semgrep/semgrep
that referenced
this issue
Sep 22, 2022
* Fix incorrect stripping of '$' from the regexp '\$' (literal dollar sign) * Add a workaround to allow querying the test program for '--help' without requiring test data. The issue was raised at mirage/alcotest#358 * Update changelog * Add link to alcotest issue * Clarify comment * Rephrase
brandonspark
pushed a commit
to semgrep/semgrep
that referenced
this issue
Sep 23, 2022
* Fix incorrect stripping of '$' from the regexp '\$' (literal dollar sign) * Add a workaround to allow querying the test program for '--help' without requiring test data. The issue was raised at mirage/alcotest#358 * Update changelog * Add link to alcotest issue * Clarify comment * Rephrase
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For testing our application, we have essentially a test folder named
foo
that contains input files. Each input file gives its name to a test case. Iffoo/
doesn't exist, it's an error and we can't run the tests. However, we want to be able to run--help
to inspect command-line options manually from any location in the file system, withoutfoo/
being present.In order to build the test suite, we must inspect folder
foo
, resulting in the test suite that we pass toAlcotest.run
. It goes like this:If we run the test program
/path/to/test.exe --help
,tests ()
will be evaluated. It will look forfoo/
and will fail instead of showing the help page.Our workaround is something close to this:
While this solution works, it still tries to load the test data when it doesn't have to. It's also not an obvious workaround. If
Alcotest.run
allowed delaying the evaluation of the test suite, it would be easier.I propose the following alternate
run
function:The change is the
test list
argument which is now(unit -> unit test list)
. A similarrun_with_args
alternative would have to be provided too.The text was updated successfully, but these errors were encountered: