Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Portability fix for 'simple' testcase - see #343 #354

Merged
merged 6 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/run_test_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,5 @@ jobs:
# to fail.
make check |& tee /dev/stderr \
| grep -F ' failed, ' | tee /dev/stderr \
| grep -F -q ', 2 failed, ' \
| grep -F -q ', 1 failed, ' \
|| { echo 'Number of tests expected to fail^^ does not match -- did you break an existing test?' >&2 ; false ; }
10 changes: 5 additions & 5 deletions tests/gendiffcov/simple/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ DIFFCOV_NOFRAME_OPTS="$BASE_OPTS --demangle-cpp --prefix $PARENT --version-scrip
DIFFCOV_OPTS="$DIFFCOV_NOFRAME_OPTS --frame"

status=0
ln -s simple.cpp test.cpp
cp simple.cpp test.cpp
${CXX} --coverage $COVERAGE_OPTS test.cpp
./a.out

Expand Down Expand Up @@ -257,7 +257,7 @@ fi
# test filter with differing version
$COVER $LCOV_TOOL $LCOV_OPTS --output filt.info --filter branch,line -a baseline2.info $IGNORE
if [ 0 == $? ] ; then
echo "ERROR: filter with mismatched version did not fail"
echo "ERROR: filter with mismatched version did not fail 2"
status=1
if [ 0 == $KEEP_GOING ] ; then
exit 1
Expand Down Expand Up @@ -928,7 +928,7 @@ fi

# and the inverse difference
rm -f test.cpp
ln -s simple.cpp test.cpp
cp simple.cpp test.cpp
diff -u simple2.cpp simple.cpp | sed -e "s|simple2*\.cpp|$ROOT/test.cpp|g" > diff_r.txt

# make the version number look different so the new diff file
Expand All @@ -937,8 +937,8 @@ sed -E 's/VER:#1/VER:#2/' current.info > current_hacked.info

# will get MD5 mismatch unless we have the simple.cpp and simple.cpp files
# set up in the expected places
echo genhtml $DIFFCOV_OPTS --baseline-file ./current_hacked.info --diff-file diff_r.txt -o ./reverse ./baseline_orig.info $IGNORE
$COVER $GENHTML_TOOL $DIFFCOV_OPTS --baseline-file ./current_hacked.info --diff-file diff_r.txt -o ./reverse ./baseline_orig.info $GENHTML_PORT $IGNORE
echo genhtml $DIFFCOV_OPTS --baseline-file ./current_hacked.info --diff-file diff_r.txt -o ./reverse ./baseline_orig.info $IGNORE --ignore version
$COVER $GENHTML_TOOL $DIFFCOV_OPTS --baseline-file ./current_hacked.info --diff-file diff_r.txt -o ./reverse ./baseline_orig.info $GENHTML_PORT $IGNORE --ignore version
if [ 0 != $? ] ; then
echo "ERROR: genhtml branch failed"
status=1
Expand Down