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

Support for a way to run the same kind of test on many files #39

Open
SamirTalwar opened this issue Jul 26, 2020 · 3 comments
Open

Support for a way to run the same kind of test on many files #39

SamirTalwar opened this issue Jul 26, 2020 · 3 comments

Comments

@SamirTalwar
Copy link
Owner

One use case for Smoke is to simply provide many different potential input and output files, and compare them. However, it gets old doing the following:

tests:
  - name: thing 1
    stdin:
      file: thing1.in
    stdout:
      file: thing1.out

  - name: thing 2
    stdin:
      file: thing2.in
    stdout:
      file: thing2.out

  - name: thing 3
    stdin:
      file: thing3.in
    stdout:
      file: thing3.out

# ...

Not only is it monotonous, but error-prone.

@jaspervdj suggested finding a better way to avoid this repetition, just like goldplate does.

@SamirTalwar
Copy link
Owner Author

Perhaps we could do something like this:

tests:
  - name: %
    stdin:
      file: *.in
    stdout:
      file: %.out

This would detect the glob expression in stdin.file, and expand it to the long form above, using % as the placeholder for the pattern matched by *.

@SamirTalwar SamirTalwar changed the title Support for glob expressions or another way to run the same kind of test on many files Support for a way to run the same kind of test on many files Jul 26, 2020
@SamirTalwar
Copy link
Owner Author

Alternatively, we could look at Dhall as a way of programmatically generating configuration files safely.

@jonaprieto
Copy link

Using Dhall would be quite nice, indeed.

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