fix check_process_replay for special characters (#5072)

* 'test' [run_process_replay] [no_assert]

* test with ( ) { } '' " "

* remove the log [run_process_replay] '' () { } '{

* helpful echos [run_process_replay] [no_assert] () ''

* test [run_process_replay] [no_assert]

* test2 [run_process_replay] [no_assert]

* test3 [run_process_replay] [no_assert]

* it's also correct this way [run_process_replay] [no_assert]

* remove extras [run_process_replay]
This commit is contained in:
qazal
2024-06-20 20:23:29 +03:00
committed by GitHub
parent 6f6b3b10c9
commit 97f1347dd9

View File

@@ -33,16 +33,24 @@ jobs:
- name: Set process replay
id: set-env
run: |
COMMIT_MESSAGE=$(git show -s --format=%B ${{ github.event.pull_request.head.sha }})
if { echo "$COMMIT_MESSAGE" | grep -q "\[run_process_replay\]" || [ "${{ github.event.inputs.run_process_replay }}" == "true" ] || echo '${{ github.event.pull_request.title }}' | grep -q "\[run_process_replay\]"; } && [ "$GITHUB_REF_NAME" != "master" ]; then
RAW_COMMIT_MESSAGE=$(git show -s --format=%B ${{ github.event.pull_request.head.sha }})
COMMIT_MESSAGE=$(printf '%q' "$RAW_COMMIT_MESSAGE")
RAW_PR_TITLE="${{ github.event.pull_request.title }}"
PR_TITLE=$(printf '%q' "$RAW_PR_TITLE")
if { echo "$COMMIT_MESSAGE" | grep -q "run_process_replay" || \
[ "${{ github.event.inputs.run_process_replay }}" == "true" ] || \
echo "$PR_TITLE" | grep -q "run_process_replay"; } && [ "$GITHUB_REF_NAME" != "master" ]; then
echo "RUN_PROCESS_REPLAY=1" >> $GITHUB_OUTPUT
if echo "$COMMIT_MESSAGE" | grep -q "\[no_assert\]"; then
echo "enabled process replay"
if echo "$COMMIT_MESSAGE" | grep -q "no_assert"; then
echo "ASSERT_PROCESS_REPLAY=0" >> $GITHUB_OUTPUT
echo "running process replay in diff-only mode"
else
echo "ASSERT_PROCESS_REPLAY=1" >> $GITHUB_OUTPUT
fi
else
echo "RUN_PROCESS_REPLAY=0" >> $GITHUB_OUTPUT
echo "disabled process replay"
fi
uops: