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
bafcaaeb
Commit
bafcaaeb
authored
Apr 21, 2015
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1110 from ipfs/graceful-exit-sharness
sharness: wait for graceful shutdown
parents
db56c0f1
cf797d3d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
test/sharness/lib/test-lib.sh
test/sharness/lib/test-lib.sh
+11
-2
test/sharness/t0030-mount.sh
test/sharness/t0030-mount.sh
+1
-1
No files found.
test/sharness/lib/test-lib.sh
View file @
bafcaaeb
...
...
@@ -236,13 +236,22 @@ test_launch_ipfs_daemon_and_mount() {
}
test_kill_repeat_10_sec
()
{
# try to shut down once + wait for graceful exit
kill
$1
for
i
in
1 2 3 4 5 6 7 8 9 10
do
kill
$1
sleep
1
!
kill
-0
$1
2>/dev/null
&&
return
done
!
kill
-0
$1
2>/dev/null
# if not, try once more, which will skip graceful exit
kill
$1
sleep
1
!
kill
-0
$1
2>/dev/null
&&
return
# ok, no hope. kill it to prevent it messing with other tests
kill
-9
$1
2>/dev/null
return
1
}
test_kill_ipfs_daemon
()
{
...
...
test/sharness/t0030-mount.sh
View file @
bafcaaeb
...
...
@@ -24,7 +24,7 @@ test_expect_success "'ipfs mount' fails when there is no mount dir" '
test_must_fail ipfs mount -f=not_ipfs -n=not_ipns >output 2>output.err
'
test_expect_
success
"'ipfs mount' output looks good"
'
test_expect_
failure
"'ipfs mount' output looks good"
'
test_must_be_empty output &&
test_should_contain "not_ipns\|not_ipfs" output.err
'
...
...
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