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-dms3
Commits
8b81793c
Commit
8b81793c
authored
Jun 13, 2015
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1370 from ipfs/update-sharness
Update sharness
parents
848502de
0befe2bf
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
10 deletions
+31
-10
test/sharness/Makefile
test/sharness/Makefile
+2
-2
test/sharness/lib/install-sharness.sh
test/sharness/lib/install-sharness.sh
+29
-8
No files found.
test/sharness/Makefile
View file @
8b81793c
...
...
@@ -35,8 +35,8 @@ aggregate: clean-test-results $(T)
deps
:
$(SHARNESS) $(BINS) curl
$(SHARNESS)
:
@
echo
"***
install
ing
$@
***"
$(SHARNESS)
:
FORCE
@
echo
"***
check
ing
$@
***"
lib/install-sharness.sh
bin/%
:
FORCE
...
...
test/sharness/lib/install-sharness.sh
View file @
8b81793c
...
...
@@ -6,21 +6,42 @@
#
# settings
version
=
5
0229a79ba22b2f13ccd82451d86570fecbd194c
version
=
5
eee9b51b5621cec95a64018f0cc779963b230d2
urlprefix
=
https://github.com/mlafeldt/sharness.git
clonedir
=
lib
sharnessdir
=
sharness
if
test
-f
"
$clonedir
/
$sharnessdir
/SHARNESS_VERSION_
$version
"
then
# There is the right version file. Great, we are done!
exit
0
fi
die
()
{
echo
>
&2
"
$@
"
exit
1
}
mkdir
-p
"
$clonedir
"
||
die
"Could not create '
$clonedir
' directory"
cd
"
$clonedir
"
||
die
"Could not cd into '
$clonedir
' directory"
checkout_version
()
{
git checkout
"
$version
"
||
die
"Could not checkout '
$version
'"
rm
-f
SHARNESS_VERSION_
*
||
die
"Could not remove 'SHARNESS_VERSION_*'"
touch
"SHARNESS_VERSION_
$version
"
||
die
"Could not create 'SHARNESS_VERSION_
$version
'"
echo
"Sharness version
$version
is checked out!"
}
git clone
"
$urlprefix
"
||
die
"Could not clone '
$urlprefix
'"
cd
"
$sharnessdir
"
||
die
"Could not cd into '
$sharnessdir
' directory"
git checkout
"
$version
"
||
die
"Could not checkout '
$version
'"
if
test
-d
"
$clonedir
/
$sharnessdir
/.git"
then
# We need to update sharness!
cd
"
$clonedir
/
$sharnessdir
"
||
die
"Could not cd into '
$clonedir
/
$sharnessdir
' directory"
git fetch
||
die
"Could not fetch to update sharness"
checkout_version
else
# We need to clone sharness!
mkdir
-p
"
$clonedir
"
||
die
"Could not create '
$clonedir
' directory"
cd
"
$clonedir
"
||
die
"Could not cd into '
$clonedir
' directory"
git clone
"
$urlprefix
"
||
die
"Could not clone '
$urlprefix
'"
cd
"
$sharnessdir
"
||
die
"Could not cd into '
$sharnessdir
' directory"
checkout_version
fi
exit
0
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