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

Use Sharness as our shell test framework, version 3 #206

Merged
merged 5 commits into from
Oct 25, 2014

Conversation

chriscool
Copy link
Contributor

This is a rework of pull-request #204 (Use Sharness as our shell test framework, version 2).
I only fixed jbenet's points 1 and 3. Thanks jbenet!

Our test framework is based on Sharness.
So the first thing to do is to source it.
This checks a little bit the installation and some
basic commands.

You can run it like that:

$ cd test
$ ./t0010-basic-commands.sh
 ok 1 - current dir is writable
 ok 2 - ipfs version succeeds
 ok 3 - ipfs version output looks good
 ok 4 - ipfs help succeeds
 ok 5 - ipfs help output looks good
 # passed all 5 test(s)
 1..5
This way we can easily reuse the checks in
test-sharness-config.sh.
This script aggregates test results using Sharness.
You can use it like this to launch all the
test scripts in order:

$ cd test
$ make
 rm -r test-results
 *** t0010-basic-commands.sh ***
 ok 1 - current dir is writable
 ok 2 - ipfs version succeeds
 ok 3 - ipfs version output looks good
 ok 4 - ipfs help succeeds
 ok 5 - ipfs help output looks good
 # passed all 5 test(s)
 1..5
 ./test-aggregate-results.sh
 fixed   0
 success 5
 failed  0
 broken  0
 total   5

Or you can just run one test like this:

$ make t0010-basic-commands.sh
 *** t0010-basic-commands.sh ***
 ok 1 - current dir is writable
 ok 2 - ipfs version succeeds
 ok 3 - ipfs version output looks good
 ok 4 - ipfs help succeeds
 ok 5 - ipfs help output looks good
 # passed all 5 test(s)
 1..5
@jbenet
Copy link
Member

jbenet commented Oct 25, 2014

@chriscool you can just push to your sharness2 branch, and PR #204 will be updated accordingly + automatically.

@chriscool
Copy link
Contributor Author

Ok, I force pushed the reworked commits in my sharness2 branch.

@jbenet
Copy link
Member

jbenet commented Oct 25, 2014

@chriscool great, thank you!

jbenet added a commit that referenced this pull request Oct 25, 2014
Use Sharness as our shell test framework, version 3
@jbenet jbenet merged commit c2692f3 into ipfs:master Oct 25, 2014
@aschmahmann aschmahmann mentioned this pull request Aug 23, 2021
62 tasks
ariescodescream pushed a commit to ariescodescream/go-ipfs that referenced this pull request Oct 23, 2021
Rephrase "betterPeersToQuery" method comment to be less cryptic
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

Successfully merging this pull request may close these issues.

2 participants