Commit Graph

31 Commits

Author SHA1 Message Date
Christian Couder
d5da16faf6 test/Makefile: add coverage target
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-10-24 12:34:40 +02:00
Jeromy
7496df76d2 vendor binary deps in test/dependencies
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-09-10 18:09:12 -07:00
Juan Batiz-Benet
431d6a5a14 added random-files tool for testing
License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-07-29 03:18:24 -07:00
Christian Couder
fd449af227 test/Makefile: build go-sleep
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-06-07 10:28:13 +02:00
rht
1e38f71a38 Add gofmt check 2015-05-19 06:11:15 +07:00
Christian Couder
cfcc7c6839 test/Makefile: add bin/iptb into BINS
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-04-26 17:28:31 +02:00
Jeromy
89ff6dfdaa add clone of 3node test using iptb instead of docker
rename directory and update vendored dep

cleanup
2015-04-22 21:25:52 -07:00
Tor Arne Vestbø
f2dd060e4a Don't use wildcards to look for .go files in tests makefile
GNU Make's wildcard function does not recurse into subdirectories when
passed the '**' glob, which results in adding a dependency only to .go
files in the first level of subdirectories under the source root.

We shell out to 'find' instead, which catches all .go files in the
given directory.
2015-04-07 21:22:04 +02:00
Christian Couder
3edd3227fe test: add test_race target to Makefile
This builds go binaries using the -race flag
and then runs all the tests.

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-04-06 18:06:24 +02:00
Christian Couder
7edfc784ac test: add GOFLAGS variable to the Makefile
This makes it possible to build binaries with
different flags.

The content of the GOFLAGS variable is stored
in a IPFS-BUILD-OPTIONS file, so that if GOFLAGS
changes a rebuild of the binaries with the new
flags is forced.

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-04-06 18:05:47 +02:00
Henry
14090d4a11 moved pollEndpoint to thirdparty/ 2015-03-04 16:25:41 +01:00
Henry
aa745fef07 specify new dep in sharenss Makefile 2015-03-04 15:06:26 +01:00
Henry
56a32a306c using pollEndpoint to block in tests for 'daemon ready' (updates #844) 2015-03-04 14:50:17 +01:00
Christian Couder
fe1ba2bf18 test: use multihash instead of shasum in tests
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>
2015-02-08 13:35:45 +01:00
Christian Couder
31d07f0f7b Add "test/dependencies" dir and "godep restore" test
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-01-23 21:27:45 +01:00
Juan Batiz-Benet
2faafa8478 test/Makefile 2015-01-07 07:57:22 -08:00
Juan Batiz-Benet
cecfa45745 moved sharness tests to a subdir.
kept bin in place
2015-01-07 07:10:17 -08:00
Brian Tiger Chow
a8127a28e1 fix: force clean test results directory
Without `-f`, `make clean` fails on machines that don't have the dir.

cc @jbenet
2015-01-05 00:16:53 -08:00
Juan Batiz-Benet
481c19ac23 sharness: note in makefile describing TEST_VERBOSE 2015-01-04 22:30:59 -08:00
Juan Batiz-Benet
607e4d3e52 sharness tests back to cmd/ipfs 2014-11-18 06:14:59 -08:00
Brian Tiger Chow
4678dea045 tests(sharness) attempt to execute sharness tests on ipfs2
@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
2014-11-16 03:20:10 -08:00
Juan Batiz-Benet
842de46ccf test: moved installed things into own dirs
I moved installed things into own dirs bin and lib.

@chriscool sorry to move things around again, the top level
test dir was getting a bit clutterd.
2014-11-08 20:12:02 -08:00
Juan Batiz-Benet
5680c112ef test: install random from vendored code 2014-11-08 18:49:28 -08:00
Christian Couder
2b5f1b2d8c Install sharness in a 'sharness' directory
It is cleaner if sharness is installed in its own
directory.
2014-11-08 02:44:03 +01:00
Juan Batiz-Benet
04efbb9a55 test: install random locally for travis. 2014-11-07 17:24:13 -08:00
Juan Batiz-Benet
7ab38696f6 travis: fix install random error 2014-11-07 15:24:31 -08:00
Juan Batiz-Benet
7e14f1737d test/: build own ipfs tool to test
The tests were using the globally installed ipfs.
This commit changes it to build + use its own ipfs binary.
2014-11-07 15:16:29 -08:00
Juan Batiz-Benet
37279d55ca install go-random 2014-11-07 14:54:58 -08:00
Juan Batiz-Benet
9535cb5802 install sharness 2014-11-07 14:53:55 -08:00
Christian Couder
07bd18b53d Display which Makefile target is launched
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2014-10-26 10:10:22 +01:00
Christian Couder
aeb019f2b8 Add test/Makefile to run the test scripts
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
2014-10-25 14:12:27 +02:00