|
3 | 3 | # Copyright (c) 2014 Christian Couder
|
4 | 4 | # MIT Licensed; see the LICENSE file in this repository.
|
5 | 5 | #
|
6 |
| -# We are using sharness (https://github.com/mlafeldt/sharness) |
| 6 | +# We are using sharness (https://github.com/chriscool/sharness) |
7 | 7 | # which was extracted from the Git test framework.
|
8 | 8 |
|
9 |
| -# use the ipfs tool to test against |
10 |
| - |
11 | 9 | # add current directory to path, for ipfs tool.
|
12 | 10 | BIN=$(cd .. && echo `pwd`/bin)
|
13 | 11 | PATH=${BIN}:${PATH}
|
14 | 12 |
|
| 13 | +# assert the `ipfs` we're using is the right one. |
| 14 | +if test $(which ipfs) != ${BIN}/ipfs; then |
| 15 | + echo >&2 "Cannot find the tests' local ipfs tool." |
| 16 | + echo >&2 "Please check test and ipfs tool installation." |
| 17 | + JS_BIN=$(dirname $(dirname "${BIN}"))"/src/cli/bin.js" |
| 18 | + echo >&2 "For js-ipfs, look for a symlink from '${BIN}/ipfs' to '${JS_BIN}'." |
| 19 | + echo >&2 "Use 'make' or 'make deps' as it should install this symlink." |
| 20 | + exit 1 |
| 21 | +fi |
| 22 | + |
15 | 23 | # set sharness verbosity. we set the env var directly as
|
16 | 24 | # it's too late to pass in --verbose, and --verbose is harder
|
17 | 25 | # to pass through in some cases.
|
18 | 26 | test "$TEST_VERBOSE" = 1 && verbose=t
|
19 | 27 |
|
20 |
| -# TODO: fix this for js-ipfs |
21 |
| -# assert the `ipfs` we're using is the right one. |
22 |
| -##if test `which ipfs` != ${BIN}/ipfs; then |
23 |
| -## echo >&2 "Cannot find the tests' local ipfs tool." |
24 |
| -## echo >&2 "Please check test and ipfs tool installation." |
25 |
| -## exit 1 |
26 |
| -##fi |
27 |
| - |
28 |
| - |
29 | 28 | # source the common hashes first.
|
30 | 29 | . lib/test-lib-hashes.sh
|
31 | 30 |
|
|
0 commit comments