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
6291662b
Commit
6291662b
authored
Oct 16, 2015
by
Christian Couder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coverage_helper: output a result
License: MIT Signed-off-by:
Christian Couder
<
chriscool@tuxfamily.org
>
parent
06c3a21c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
test/sharness_test_coverage_helper.sh
test/sharness_test_coverage_helper.sh
+17
-4
No files found.
test/sharness_test_coverage_helper.sh
View file @
6291662b
...
...
@@ -106,23 +106,36 @@ reverse() {
fi
}
log
"Math the test line commands with the commands they use"
log
"Match the test line commands with the commands they use"
GLOBAL_REV
=
"
$TMPDIR
/global_results_reversed.txt"
reverse
"
$CMD_CMDS
"
|
while
read
-r
ipfs cmd sub1 sub2
do
if
test
-n
"
$sub2
"
then
egrep
"
$ipfs
(
\W
.*)*
\W
$cmd
(
\W
.*)*
\W
$sub1
(
\W
.*)*
\W
$sub2
"
"
$CMD_RES
"
>
"
$TMPDIR
/res_
${
ipfs
}
_
${
cmd
}
_
${
sub1
}
_
${
sub2
}
.txt"
CMD_OUT
=
"
$TMPDIR
/res_
${
ipfs
}
_
${
cmd
}
_
${
sub1
}
_
${
sub2
}
.txt"
egrep
"
$ipfs
(
\W
.*)*
\W
$cmd
(
\W
.*)*
\W
$sub1
(
\W
.*)*
\W
$sub2
"
"
$CMD_RES
"
>
"
$CMD_OUT
"
reverse
"
$CMD_OUT
"
|
sed
-e
's/^sharness\///'
|
cut
-d-
-f1
|
uniq
-c
>>
"
$GLOBAL_REV
"
echo
"
$ipfs
$cmd
$sub1
$sub2
"
>>
"
$GLOBAL_REV
"
else
if
test
-n
"
$sub1
"
then
egrep
"
$ipfs
(
\W
.*)*
\W
$cmd
(
\W
.*)*
\W
$sub1
"
"
$CMD_RES
"
>
"
$TMPDIR
/res_
${
ipfs
}
_
${
cmd
}
_
${
sub1
}
.txt"
CMD_OUT
=
"
$TMPDIR
/res_
${
ipfs
}
_
${
cmd
}
_
${
sub1
}
.txt"
egrep
"
$ipfs
(
\W
.*)*
\W
$cmd
(
\W
.*)*
\W
$sub1
"
"
$CMD_RES
"
>
"
$CMD_OUT
"
reverse
"
$CMD_OUT
"
|
sed
-e
's/^sharness\///'
|
cut
-d-
-f1
|
uniq
-c
>>
"
$GLOBAL_REV
"
echo
"
$ipfs
$cmd
$sub1
"
>>
"
$GLOBAL_REV
"
else
if
test
-n
"
$cmd
"
then
egrep
"
$ipfs
(
\W
.*)*
\W
$cmd
"
"
$CMD_RES
"
>
"
$TMPDIR
/res_
${
ipfs
}
_
${
cmd
}
.txt"
CMD_OUT
=
"
$TMPDIR
/res_
${
ipfs
}
_
${
cmd
}
.txt"
egrep
"
$ipfs
(
\W
.*)*
\W
$cmd
"
"
$CMD_RES
"
>
"
$CMD_OUT
"
reverse
"
$CMD_OUT
"
|
sed
-e
's/^sharness\///'
|
cut
-d-
-f1
|
uniq
-c
>>
"
$GLOBAL_REV
"
echo
"
$ipfs
$cmd
"
>>
"
$GLOBAL_REV
"
fi
fi
fi
done
log
"Print results"
reverse
"
$GLOBAL_REV
"
# Remove temp directory...
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