moved sharness tests to a subdir.
kept bin in place
Juan Batiz-Benet committed
Jan 7, 2015 at 07:06 UTC
cecfa45745c8e4d4378546a88478c499de0368f9
17 files changed
+58
-40
Makefile
+2
-2
@@ -35,10 +35,10 @@ test_go_expensive:
35
go test ./...
36
37
test_sharness_short:
38
- cd test/ && make
38
+ cd test/sharness/ && make
39
40
test_sharness_expensive:
41
- cd test/ && TEST_EXPENSIVE=1 make
41
+ cd test/sharness/ && TEST_EXPENSIVE=1 make
42
43
test_all_commits:
44
@echo "testing all commits between origin/master..HEAD"
test/.gitignore
-3
@@ -1,5 +1,2 @@
1
-lib/sharness/
1
bin/ipfs
2
bin/random
4
-test-results/
5
-trash directory.*.sh/
test/Makefile
+15
-35
@@ -1,45 +1,25 @@
1
-# Run tests
2
-#
3
-# Copyright (c) 2014 Christian Couder
4
-# MIT Licensed; see the LICENSE file in this repository.
5
-#
1
7
-# NOTE: run with TEST_VERBOSE=1 for verbose sharness tests.
2
+BINS = bin/random bin/ipfs
3
+IPFS_ROOT = ../
4
+IPFS_CMD = ../cmd/ipfs
5
+RANDOM_SRC = ../Godeps/_workspace/src/github.com/jbenet/go-random
6
9
-T = $(sort $(wildcard t[0-9][0-9][0-9][0-9]-*.sh))
10
-SHARNESS = lib/sharness/sharness.sh
11
-RANDOMSRC = Godeps/_workspace/src/github.com/jbenet/go-random/random
7
+all: deps
8
13
-all: clean deps $(T) aggregate
9
+deps: bins
10
11
clean:
16
- @echo "*** $@ ***"
17
- -rm -rf test-results
12
+ rm $(BINS)
13
19
-$(T):
20
- @echo "*** $@ ***"
21
- ./$@
14
+bins: $(BINS)
15
23
-aggregate:
24
- @echo "*** $@ ***"
25
- lib/test-aggregate-results.sh
16
+bin/random: $(RANDOM_SRC)/**/*.go
17
+ go build -o bin/random $(RANDOM_SRC)/random
18
27
-deps: $(SHARNESS) ipfs random
19
+bin/ipfs: $(IPFS_ROOT)/**/*.go
20
+ go build -o bin/ipfs $(IPFS_CMD)
21
29
-$(SHARNESS):
30
- @echo "*** installing $@ ***"
31
- lib/install-sharness.sh
22
+test_sharness:
23
+ cd sharness && make
24
33
-# phony to ensure we re-build it every time we run tests
34
-ipfs:
35
- @echo "*** installing $@ ***"
36
- mkdir -p bin
37
- cd ../cmd/ipfs && go build
38
- cp ../cmd/ipfs/ipfs bin/ipfs
39
-
40
-random:
41
- @echo "*** installing $@ ***"
42
- mkdir -p bin
43
- go build -o bin/random ../$(RANDOMSRC)
44
-
45
-.PHONY: all clean $(T) aggregate ipfs random
25
+.PHONY: all clean
test/sharness/.gitignore
new
+3
@@ -0,0 +1,3 @@
1
+lib/sharness/
2
+test-results/
3
+trash directory.*.sh/
test/sharness/Makefile
new
+37
@@ -0,0 +1,37 @@
1
+# Run tests
2
+#
3
+# Copyright (c) 2014 Christian Couder
4
+# MIT Licensed; see the LICENSE file in this repository.
5
+#
6
+
7
+# NOTE: run with TEST_VERBOSE=1 for verbose sharness tests.
8
+
9
+T = $(sort $(wildcard t[0-9][0-9][0-9][0-9]-*.sh))
10
+BINS = bin/random bin/ipfs
11
+SHARNESS = lib/sharness/sharness.sh
12
+
13
+all: clean deps $(T) aggregate
14
+
15
+clean:
16
+ @echo "*** $@ ***"
17
+ -rm -rf test-results
18
+
19
+$(T):
20
+ @echo "*** $@ ***"
21
+ ./$@
22
+
23
+aggregate:
24
+ @echo "*** $@ ***"
25
+ lib/test-aggregate-results.sh
26
+
27
+deps: $(SHARNESS) $(BINS)
28
+
29
+$(SHARNESS):
30
+ @echo "*** installing $@ ***"
31
+ lib/install-sharness.sh
32
+
33
+bin/%:
34
+ @echo "*** installing $@ ***"
35
+ cd .. && make $@
36
+
37
+.PHONY: all clean $(T) aggregate
test/sharness/README.md
renamed
test/sharness/bin
new
+1
@@ -0,0 +1 @@
1
+../bin
\ No newline at end of file