As shasum is not installed on all machines and
we use multihash anyway in the code base, it
removes one dependency to use shasum instead of
shasum in the tests.
Now that there are sharness tests in multihash
it is also safe to use it.
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
@jbenet @chriscool
(not to be merged into master) This is a hack to run sharness tests on
th ipfs2 binary. Instead of compiling cmd/ipfs, it compiles cmd/ipfs2
and copies this into test/bin/ipfs.
I thought this would be enough to pass the `basic-commands` test, but
it's not.
Although the output is fairly similar, the `ipfs version` test fails.
```
test (feat/test2) λ. diff version1 version2
1c1
< ipfs version 0.1.7
---
> ipfs version 0.1.5
```
I'm not very experienced with `sh` scripting, so perhaps I'm missing a
key ingredient or maybe misunderstanding the the tests are meant to
work.
Would like to get input on this.
Thanks, @maybebtc
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