Skip to content

Commit 68aeac4

Browse files
committed
fixup! csfilter-kfp: script to filter known false positives
1 parent 889765b commit 68aeac4

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

tests/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ set(diffcmd "diff -up")
2626

2727
# eliminate csdiff's version string in the output
2828
set(jsfilter "sed -e 's|\"version\": \"[^\"]*\"|\"version\": \"\"|g'")
29+
set(jsfilter "${jsfilter} -e 's|${CMAKE_SOURCE_DIR}/tests/csfilter-kfp/|\$PROJECT_ROOT/tests/csfilter-kfp/|'")
2930

3031
macro(add_test_wrap test_name cmd)
3132
add_test("${test_name}" bash -c "${cmd}")

tests/csfilter-kfp/0001-stdout.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"exit-code": 0,
1717
"host": "osh-worker-001.osh-001.prod.iad2.dc.redhat.com",
1818
"known-false-positives": "/usr/share/csmock/known-false-positives.js",
19-
"known-false-positives-dir": "/home/kdudka/git/csdiff/tests/csfilter-kfp/0001-kfp",
19+
"known-false-positives-dir": "$PROJECT_ROOT/tests/csfilter-kfp/0001-kfp",
2020
"known-false-positives-rpm": "known-false-positives-2.1.0.20240515.103302.g38b39b1-1.el9.noarch",
2121
"mock-config": "fedora-rawhide-x86_64",
2222
"project-name": "project-koku-koku-cbe5e5c3355c1e140aa1cca7377aebe09d8d8466",

tests/csfilter-kfp/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ macro(test_csfilter_kfp tst)
2525
if(EXISTS "${test_data_prefix}-stdin.txt")
2626
set(cmd "${cmd} <${test_data_prefix}-stdin.txt")
2727
endif()
28-
set(cmd "${cmd} | ${diffcmd} ${test_data_prefix}-stdout.txt -")
28+
set(cmd "${cmd} | ${jsfilter} | ${diffcmd} ${test_data_prefix}-stdout.txt -")
2929
add_test_wrap("csfilter-kfp-${tst}" "${cmd}")
3030
endmacro()
3131

tests/test-lib.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22

33
# FIXME: copy-pasted from ../../CMakeLists.txt
44
# eliminate csdiff's version string in the output
5-
export JSFILTER_CMD="sed -e 's|\"version\": \"[^\"]*\"|\"version\": \"\"|g'"
5+
export JSFILTER_CMD="sed \
6+
-e 's|\"version\": \"[^\"]*\"|\"version\": \"\"|g' \
7+
-e 's|$PROJECT_ROOT/tests/csfilter-kfp/|\$PROJECT_ROOT/tests/csfilter-kfp/|'"

0 commit comments

Comments
 (0)