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

tests/csgrep/sync.sh does not work for tests 0076 and 0077 #114

Closed
kdudka opened this issue Mar 3, 2023 · 1 comment · Fixed by #116
Closed

tests/csgrep/sync.sh does not work for tests 0076 and 0077 #114

kdudka opened this issue Mar 3, 2023 · 1 comment · Fixed by #116
Assignees
Labels

Comments

@kdudka
Copy link
Member

kdudka commented Mar 3, 2023

% cd tests/csgrep

% ./sync.sh 0076-filter-file-basic
+./sync.sh:5> . ../test-lib.sh
+../test-lib.sh:5> export JSFILTER_CMD='sed -e '\''s|"version": "[^"]*"|"version": ""|g'\'
+./sync.sh:7> [[ 1 -eq 0 ]]
+./sync.sh:10> tests=( 0076-filter-file-basic ) 
+./sync.sh:13> tst=0076-filter-file-basic
+./sync.sh:14> tst=0076-filter-file-basic 
+./sync.sh:15> eval '../../csdiff_build/src/csgrep --remove-duplicates --filter-file ../../../tests/csgrep/0076-filter-file-basic-filter.json 0076-filter-file-basic-stdin.txt'
+./sync.sh:16> eval 'sed -e '\''s|"version": "[^"]*"|"version": ""|g'\'
+(eval):1> ../../csdiff_build/src/csgrep --remove-duplicates --filter-file ../../../tests/csgrep/0076-filter-file-basic-filter.json 0076-filter-file-basic-stdin.txt
+(eval):1> sed -e 's|"version": "[^"]*"|"version": ""|g'
../../../tests/csgrep/0076-filter-file-basic-filter.json: failed to open filter file

% ./sync.sh 0077-filter-file
+./sync.sh:5> . ../test-lib.sh
+../test-lib.sh:5> export JSFILTER_CMD='sed -e '\''s|"version": "[^"]*"|"version": ""|g'\'
+./sync.sh:7> [[ 1 -eq 0 ]]
+./sync.sh:10> tests=( 0077-filter-file ) 
+./sync.sh:13> tst=0077-filter-file
+./sync.sh:14> tst=0077-filter-file 
+./sync.sh:16> eval 'sed -e '\''s|"version": "[^"]*"|"version": ""|g'\'
./sync.sh:15: no such file or directory: 0077-filter-file-args.txt
+./sync.sh:15> eval '../../csdiff_build/src/csgrep  0077-filter-file-stdin.txt'
+(eval):1> sed -e 's|"version": "[^"]*"|"version": ""|g'
+(eval):1> ../../csdiff_build/src/csgrep 0077-filter-file-stdin.txt
0077-filter-file-stdin.txt: failed to open input file
@lzaoral
Copy link
Member

lzaoral commented Mar 6, 2023

The problem is present from the introduction of the 653f312 option and stems from the fact that ctest and sync.sh use a different working directory (thus simply fixing the path from sync.sh breaks ctest and vice-versa.).

lzaoral added a commit to lzaoral/csdiff that referenced this issue Mar 6, 2023
@lzaoral lzaoral linked a pull request Mar 6, 2023 that will close this issue
@lzaoral lzaoral closed this as completed in b4a7f69 Mar 6, 2023
lbossis added a commit to lbossis/csmock that referenced this issue Aug 15, 2023
lbossis added a commit to lbossis/csmock that referenced this issue Aug 16, 2023
lbossis added a commit to lbossis/csmock that referenced this issue Aug 17, 2023
    command line option for controlling event message length from csmock.
    gitleaks: implement --gitleaks-limit-msg-len defaulting to 512
    csmock-plugin-gitleaks is dependent on the updated version of csdiff

    Fixes: csutils/csdiff#114
    Related: https://issues.redhat.com/browse/OSH-67
lbossis added a commit to lbossis/csmock that referenced this issue Aug 17, 2023
This package contains an extension of gitleaks plug-in to support a new
command line option for controlling event message length from csmock.
csmock-plugin-gitleaks is dependent on the updated version of csdiff

Fixes: csutils/csdiff#114
Related: https://issues.redhat.com/browse/OSH-67
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants