forked from openvswitch/ovs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework and simplify the "lcov" support for the testsuite.
- Loading branch information
Showing
31 changed files
with
229 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
# -*- shell-script -*- | ||
HAVE_OPENSSL='@HAVE_OPENSSL@' | ||
HAVE_PYTHON='@HAVE_PYTHON@' | ||
LCOV='@LCOV@' | ||
PERL='@PERL@' | ||
PYTHON='@PYTHON@' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#! /bin/sh | ||
|
||
abs_top_builddir='@abs_top_builddir@' | ||
wrap_program=`basename '@wrap_program@'` | ||
|
||
# Strip the first directory from $PATH that contains $wrap_program, | ||
# so that below we run the real $wrap_program, not ourselves. | ||
not_found=true | ||
new_path= | ||
first=true | ||
save_IFS=$IFS | ||
IFS=: | ||
for dir in $PATH; do | ||
IFS=$save_IFS | ||
if $not_found && test -x "$dir/$wrap_program"; then | ||
not_found=false | ||
else | ||
if $first; then | ||
first=false | ||
new_path=$dir | ||
else | ||
new_path=$new_path:$dir | ||
fi | ||
fi | ||
done | ||
IFS=$save_IFS | ||
if $not_found; then | ||
echo "$0: error: cannot find $wrap_program in \$PATH" >&2 | ||
exit 1 | ||
fi | ||
PATH=$new_path | ||
export PATH | ||
|
||
# XXX Probably want some kind of synchronization here to deal with | ||
# programs running in parallel. | ||
LCOV="lcov -b $abs_top_builddir -d $abs_top_builddir -q" | ||
$LCOV -z | ||
|
||
# Run the subprocess and propagate signals to it. | ||
for signal in 1 2 3 5 15; do | ||
trap "kill -$signal \$! # Propagate signal | ||
trap - $signal # Reset signal to default | ||
wait # Wait for child to die | ||
kill -$signal $$ # Kill ourselves with same signal | ||
exit 1 # Exit in case 'kill' failed" $signal | ||
done | ||
$wrap_program 0<&0 "$@" & # 0<&0 prevents shell from closing stdin | ||
exec 0</dev/null # Don't hold stdin open unnecessarily | ||
wait $!; rc=$? | ||
|
||
# Run lcov, but only if some .gcda files were produced, since lcov | ||
# complains otherwise. | ||
for file in `find "$abs_top_builddir" -name '*.gcda'`; do | ||
$LCOV -c -o - >> "$abs_top_builddir/tests/coverage.info" | ||
break | ||
done | ||
|
||
exit $rc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.