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
e1ef4d6f
Commit
e1ef4d6f
authored
Oct 17, 2015
by
Christian Couder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coverage_helper: log found commands
License: MIT Signed-off-by:
Christian Couder
<
chriscool@tuxfamily.org
>
parent
292ef427
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
test/sharness_test_coverage_helper.sh
test/sharness_test_coverage_helper.sh
+12
-3
No files found.
test/sharness_test_coverage_helper.sh
View file @
e1ef4d6f
...
...
@@ -63,7 +63,9 @@ grep_out '^[^:]+:[^:]+:\s*#' expect comment "comments"
grep_out
'test_description='
comment desc
"test_description lines"
grep_out
'^[^:]+:[^:]+:\s*\w+="[^"]*"\s*(\&\&)?\s*$'
desc def
"variable definition lines"
grep_out
'^[^:]+:[^:]+:\s*e?grep\W[^|]*\Wipfs'
def
grep
"grep lines"
grep_out
'^[^:]+:[^:]+:\s*echo\W[^|]*\Wipfs'
grep echo
"echo lines"
grep_out
'^[^:]+:[^:]+:\s*cat\W[^|]*\Wipfs'
grep cat
"cat lines"
grep_out
'^[^:]+:[^:]+:\s*rmdir\W[^|]*\Wipfs'
cat rmdir
"rmdir lines"
grep_out
'^[^:]+:[^:]+:\s*echo\W[^|]*\Wipfs'
cat echo
"echo lines"
grep_in
()
{
pattern
=
"
$1
"
...
...
@@ -131,12 +133,19 @@ do
fi
fi
egrep
"
$PATTERN
"
"
$CMD_RES
"
>
"
$CMD_OUT
"
reverse
"
$CMD_OUT
"
|
sed
-e
's/^sharness\///'
|
cut
-d-
-f1
|
uniq
-c
>>
"
$GLOBAL_REV
"
egrep
"
$PATTERN
"
"
$CMD_RES
"
>
"
$CMD_OUT
.txt
"
reverse
"
$CMD_OUT
.txt
"
|
sed
-e
's/^sharness\///'
|
cut
-d-
-f1
|
uniq
-c
>>
"
$GLOBAL_REV
"
echo
"
$NAME
"
>>
"
$GLOBAL_REV
"
fi
done
# The following will allow us to check that
# we are properly excuding enough stuff using:
# diff -u ipfs_cmd_result.txt cmd_found.txt
log
"Get all the line commands that matched"
CMD_FOUND
=
"
$TMPDIR
/cmd_found.txt"
cat
$TMPDIR
/res_
*
.txt |
sort
-n
|
uniq
>
"
$CMD_FOUND
"
log
"Print results"
reverse
"
$GLOBAL_REV
"
...
...
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