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
25fbf191
Unverified
Commit
25fbf191
authored
Feb 18, 2020
by
Steven Allen
Committed by
GitHub
Feb 18, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6908 from ipfs/test/test-sharness-tests
test(sharness): test our tests
parents
ff0feb42
6e8c25ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
test/sharness/t0001-tests-work.sh
test/sharness/t0001-tests-work.sh
+26
-0
No files found.
test/sharness/t0001-tests-work.sh
0 → 100755
View file @
25fbf191
#!/usr/bin/env bash
test_description
=
"Test sharness tests are correctly written"
.
lib/test-lib.sh
for
file
in
$(
find ..
-maxdepth
1
-name
't*.sh'
-type
f
)
;
do
test_expect_success
"test in
$file
finishes"
'
grep -q "^test_done\b" "$file"
'
test_expect_success
"test in
$file
has a description"
'
test_must_fail grep -L "^test_description=" "$file"
'
# We have some tests that manually kill.
case
"
$(
basename
"
$file
"
)
"
in
t0060-daemon.sh|t0023-shutdown.sh
)
continue
;;
esac
test_expect_success
"test in
$file
has matching ipfs start/stop"
'
awk "/^ *[^#]*test_launch_ipfs_daemon/ { if (count != 0) { exit(1) }; count++ } /^ *[^#]*test_kill_ipfs_daemon/ { if (count != 1) { exit(1) }; count-- } END { exit(count) }" "$file"
'
done
test_done
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