Skip to content
This repository has been archived by the owner on Dec 19, 2020. It is now read-only.

Improve tests #175

Merged
merged 3 commits into from Nov 19, 2019
Merged

Improve tests #175

merged 3 commits into from Nov 19, 2019

Conversation

jackkoenig
Copy link
Collaborator

Minor improvements:

  • Make it possible to set which wit to use in regress.sh
  • Purge "regress" from testing terminology

Mainly motivated by wanting to test an install from a regular wit repo. You can now run the tests by setting environment variable WIT and it will use that wit instead:

$ WIT=/path/to/wit/0.11.1 ./t/test_all.sh

Copy link
Member

@richardxia richardxia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

.travis.yml Show resolved Hide resolved
@@ -4,7 +4,14 @@ wit_repo='git@github.com:sifive/wit'
test_root=$(dirname $(perl -MCwd -e "print Cwd::realpath('$0')"))
wit_root=$(perl -MCwd -e "print Cwd::realpath('$test_root/..')")

export PATH=$wit_root:${PATH}
if [[ -z "${WIT}" ]]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this WIT environment variable documented anywhere? Also, it's a little unintuitive that a variable named WIT should point to the directory containing the wit executable, not the wit executable itself. Should we consider setting WIT to the path of the executable itself, and defaulting to $wit_root/wit if it's unset?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be clear, this code doesn't require that WIT points to the directory containing wit, it also works for the executable itself, eg.

WIT=`which wit` ./t/test_all.sh

This will use the result of which wit.

Nothing about the tests are documented at all. I'll add a little blurb to the README-internals

Also use the new Makefiles rules in Travis
@jackkoenig jackkoenig merged commit fdbb978 into master Nov 19, 2019
@jackkoenig jackkoenig deleted the improve-tests branch November 19, 2019 20:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants