Skip to content

Commit c8ab408

Browse files
committed
Portability issues in 'simple' testcase. See #343.
Signed-off-by: Henry Cox <[email protected]>
1 parent b70a9f2 commit c8ab408

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.github/workflows/run_test_suite.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,5 +92,5 @@ jobs:
9292
# to fail.
9393
make check |& tee /dev/stderr \
9494
| grep -F ' failed, ' | tee /dev/stderr \
95-
| grep -F -q ', 2 failed, ' \
95+
| grep -F -q ', 1 failed, ' \
9696
|| { echo 'Number of tests expected to fail^^ does not match -- did you break an existing test?' >&2 ; false ; }

tests/gendiffcov/simple/script.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ DIFFCOV_NOFRAME_OPTS="$BASE_OPTS --demangle-cpp --prefix $PARENT --version-scrip
180180
DIFFCOV_OPTS="$DIFFCOV_NOFRAME_OPTS --frame"
181181
182182
status=0
183-
ln -s simple.cpp test.cpp
183+
cp simple.cpp test.cpp
184184
${CXX} --coverage $COVERAGE_OPTS test.cpp
185185
./a.out
186186
@@ -257,7 +257,7 @@ fi
257257
# test filter with differing version
258258
$COVER $LCOV_TOOL $LCOV_OPTS --output filt.info --filter branch,line -a baseline2.info $IGNORE
259259
if [ 0 == $? ] ; then
260-
echo "ERROR: filter with mismatched version did not fail"
260+
echo "ERROR: filter with mismatched version did not fail 2"
261261
status=1
262262
if [ 0 == $KEEP_GOING ] ; then
263263
exit 1
@@ -928,7 +928,7 @@ fi
928928
929929
# and the inverse difference
930930
rm -f test.cpp
931-
ln -s simple.cpp test.cpp
931+
cp simple.cpp test.cpp
932932
diff -u simple2.cpp simple.cpp | sed -e "s|simple2*\.cpp|$ROOT/test.cpp|g" > diff_r.txt
933933
934934
# make the version number look different so the new diff file
@@ -937,8 +937,8 @@ sed -E 's/VER:#1/VER:#2/' current.info > current_hacked.info
937937
938938
# will get MD5 mismatch unless we have the simple.cpp and simple.cpp files
939939
# set up in the expected places
940-
echo genhtml $DIFFCOV_OPTS --baseline-file ./current_hacked.info --diff-file diff_r.txt -o ./reverse ./baseline_orig.info $IGNORE
941-
$COVER $GENHTML_TOOL $DIFFCOV_OPTS --baseline-file ./current_hacked.info --diff-file diff_r.txt -o ./reverse ./baseline_orig.info $GENHTML_PORT $IGNORE
940+
echo genhtml $DIFFCOV_OPTS --baseline-file ./current_hacked.info --diff-file diff_r.txt -o ./reverse ./baseline_orig.info $IGNORE --ignore version
941+
$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
942942
if [ 0 != $? ] ; then
943943
echo "ERROR: genhtml branch failed"
944944
status=1

0 commit comments

Comments
 (0)