Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-unixfs
Commits
2b5f1b2d
Commit
2b5f1b2d
authored
Nov 08, 2014
by
Christian Couder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Install sharness in a 'sharness' directory
It is cleaner if sharness is installed in its own directory.
parent
39c1930e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
9 deletions
+19
-9
test/.gitignore
test/.gitignore
+1
-0
test/Makefile
test/Makefile
+9
-7
test/install-sharness.sh
test/install-sharness.sh
+7
-0
test/test-aggregate-results.sh
test/test-aggregate-results.sh
+1
-1
test/test-lib.sh
test/test-lib.sh
+1
-1
No files found.
test/.gitignore
View file @
2b5f1b2d
sharness/
test-results/
trash directory.*.sh/
test/Makefile
View file @
2b5f1b2d
...
...
@@ -5,6 +5,7 @@
#
T
=
$(
sort
$(
wildcard
t[0-9][0-9][0-9][0-9]-
*
.sh
))
SHARNESS
=
sharness/sharness.sh
all
:
clean deps $(T) aggregate
...
...
@@ -20,21 +21,22 @@ aggregate:
@
echo
"***
$@
***"
./test-aggregate-results.sh
deps
:
ipfs sharness.sh random
deps
:
$(SHARNESS) ipfs random
$(SHARNESS)
:
@
echo
"*** installing
$@
***"
./install-sharness.sh
# phony to ensure we re-build it every time we run tests
ipfs
:
@
echo
"*** installing
$@
***"
cd
../cmd/ipfs
&&
go build
cp
../cmd/ipfs/ipfs ipfs
sharness.sh
:
@
echo
"*** installing
$@
***"
./install-sharness.sh
.PHONY
:
all clean $(T) aggregate ipfs
random
:
@
echo
"*** installing
$@
***"
go get github.com/jbenet/go-random/random
go
install
github.com/jbenet/go-random/random
cp
`
which random
`
random
.PHONY
:
all clean $(T) aggregate ipfs random
test/install-sharness.sh
View file @
2b5f1b2d
...
...
@@ -16,6 +16,11 @@ shash=eeaf96630fc25ec58fb678b64ef9772d5eb92f64
afile
=
aggregate-results.sh
ahash
=
948d6bc03222c5c00a1ed048068508d5ea1cce59
die
()
{
echo
>
&2
$@
exit
1
}
verified_download
()
{
file
=
$1
hash1
=
$2
...
...
@@ -34,6 +39,8 @@ verified_download() {
return
0
}
mkdir
-p
sharness
||
die
"Could not create 'sharness' directory"
cd
sharness
||
die
"Could not cd into 'sharness' directory"
verified_download
"
$sfile
"
"
$shash
"
;
sok
=
$?
verified_download
"
$afile
"
"
$ahash
"
;
aok
=
$?
...
...
test/test-aggregate-results.sh
View file @
2b5f1b2d
...
...
@@ -6,7 +6,7 @@
# MIT Licensed; see the LICENSE file in this repository.
#
SHARNESS_AGGREGATE
=
"
.
/aggregate-results.sh"
SHARNESS_AGGREGATE
=
"
sharness
/aggregate-results.sh"
test
-f
"
$SHARNESS_AGGREGATE
"
||
{
echo
>
&2
"Cannot find:
$SHARNESS_AGGREGATE
"
...
...
test/test-lib.sh
View file @
2b5f1b2d
...
...
@@ -18,7 +18,7 @@ if test `which ipfs` != $(pwd)/ipfs; then
exit
1
fi
SHARNESS_LIB
=
"
.
/sharness.sh"
SHARNESS_LIB
=
"
sharness
/sharness.sh"
.
"
$SHARNESS_LIB
"
||
{
echo
>
&2
"Cannot source:
$SHARNESS_LIB
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment