Skip to content

Commit

Permalink
Portability issues in 'simple' testcase. See #343.
Browse files Browse the repository at this point in the history
Signed-off-by:  Henry Cox <[email protected]>
  • Loading branch information
henry2cox committed Dec 18, 2024
1 parent b70a9f2 commit c8ab408
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
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

0 comments on commit c8ab408

Please sign in to comment.