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

Improvements for tests/ci.sh #108

Closed
anta5010 opened this issue Feb 20, 2020 · 4 comments
Closed

Improvements for tests/ci.sh #108

anta5010 opened this issue Feb 20, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@anta5010
Copy link
Collaborator

It might be useful to use tests/ci.sh for manual testing. But, to be able to do that we can make some improvements. For example:

  1. The script can't be run more than once in some cases because:
    • For TPM and "all" providers tests tpm_server is started, but not stopped
    • For the PKCS11 and "all" providers find_slot_number.sh is run. This script adds a line to config.toml without checking if the line exists already and parsec fails to start.
  2. Parsec status is not checked after "cargo run" and "cargo test" is run even if parsec failed to start.
  3. If possible we should replace all the hard-coded timeouts with waiting for an event.
  4. May be make "cargo clean" optional
@ionut-arm ionut-arm added the enhancement New feature or request label Feb 20, 2020
@ionut-arm
Copy link
Member

The points sound compelling, the reason for most of those is that the script was mainly intended to be run for CI purposes, but I think it makes sense to convert it into a "test-running script".

I'm not sure if it would be worth the time investment into making it a python script instead of bash - more versatile and probably easier to work with for the future, but some cost involved in actually converting the whole thing.

@anta5010
Copy link
Collaborator Author

The script mostly runs commands, so I don't think it's worth converting to python

@hug-dev
Copy link
Member

hug-dev commented Feb 20, 2020

Seems like pretty good improvements!

  1. Parsec status is not checked after "cargo run" and "cargo test" is run even if parsec failed to start.
  2. If possible we should replace all the hard-coded timeouts with waiting for an event.

It would be nice indeed to find a way of checking Parsec status instead of just waiting a hard-coded timeout. That would address those two issues.
One idea would be to have a special test target in the client that tries to perform Ping requests until it works?

@anta5010 anta5010 changed the title Improvments for tests/ci.sh Improvements for tests/ci.sh Feb 28, 2020
@anta5010
Copy link
Collaborator Author

#117

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants