Skip to content

Commit

Permalink
Change $TAG to $DIR in execute-gcc-tests.sh and `create-gcc-sum…
Browse files Browse the repository at this point in the history
…mary.sh` so it is easier to use them standalone
  • Loading branch information
Blackhex committed Sep 3, 2024
1 parent 763c14f commit 8486f89
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 22 deletions.
8 changes: 4 additions & 4 deletions .github/scripts/toolchain/create-gcc-summary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source `dirname ${BASH_SOURCE[0]}`/../config.sh

TAG=$1
DIR=$1

print_summary() {
local TITLE=$1
Expand Down Expand Up @@ -47,7 +47,7 @@ TOTAL_UNSUPPORTED_TESTS=0
TOTAL_DEJAGNU_ERRORS=0

set +x # echo off
for SUM_FILE in "$ARTIFACT_PATH/gcc-tests-$TAG/"*.sum; do
for FILE in `find $DIR -path '*.sum'`; do
EXPECTED_PASSES=0
UNEXPECTED_FAILURES=0
UNEXPECTED_SUCCESSES=0
Expand Down Expand Up @@ -80,9 +80,9 @@ for SUM_FILE in "$ARTIFACT_PATH/gcc-tests-$TAG/"*.sum; do
DEJAGNU_ERRORS=$(($DEJAGNU_ERRORS + $(echo "$LINE" | awk '{print $5}')))
;;
esac
done <"$SUM_FILE"
done < "$FILE"

print_summary "Summary for \`$(basename $SUM_FILE)\`" $EXPECTED_PASSES $UNEXPECTED_FAILURES \
print_summary "Summary for \`$(basename $FILE)\`" $EXPECTED_PASSES $UNEXPECTED_FAILURES \
$UNEXPECTED_SUCCESSES $EXPECTED_FAILURES $UNRESOLVED_TESTCASES $UNSUPPORTED_TESTS \
$DEJAGNU_ERRORS

Expand Down
4 changes: 2 additions & 2 deletions .github/scripts/toolchain/execute-gcc-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ CCACHE=0 # Disable ccache for testing.

source `dirname ${BASH_SOURCE[0]}`/../config.sh

TAG=$1
DIR=$1
MODULE=$2
FILTER=$3
TARGET_BOARD=${4:-wsl-sim}
HOST_BOARD=${5:-}

GCC_BUILD_PATH=$BUILD_PATH/gcc
TEST_RESULTS_PATH=$ARTIFACT_PATH/gcc-tests-$TAG
TEST_RESULTS_PATH=$ARTIFACT_PATH/$DIR

PATH="$TOOLCHAIN_PATH/bin:$PATH"

Expand Down
11 changes: 5 additions & 6 deletions .github/scripts/toolchain/group-gcc-test-failures.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

source `dirname ${BASH_SOURCE[0]}`/../config.sh

TAG=$1
SUMMARY_OUTPUT=$2
DIR=$1

python3 $ROOT_PATH/.github/scripts/toolchain/group-gcc-test-failures.py \
--dir $ARTIFACT_PATH/gcc-tests-$TAG >> \
$ARTIFACT_PATH/gcc-tests-$TAG/grouped-test-failures.md
--dir $ARTIFACT_PATH/$DIR >> \
$ARTIFACT_PATH/$DIR/grouped-test-failures.md

cat $ARTIFACT_PATH/gcc-tests-$TAG/grouped-test-failures.md |
$ROOT_PATH/.github/scripts/toolchain/extract-most-frequent-failures.sh 10 >> $SUMMARY_OUTPUT
cat $ARTIFACT_PATH/$DIR/grouped-test-failures.md |
$ROOT_PATH/.github/scripts/toolchain/extract-most-frequent-failures.sh 10
17 changes: 7 additions & 10 deletions .github/workflows/build-and-test-toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,22 +137,19 @@ jobs:

- name: Execute GCC tests
run: |
~/work/.github/scripts/toolchain/execute-gcc-tests.sh "${{ env.TAG }}" "${{ env.MODULE }}" "${{ env.FILTER }}"
~/work/.github/scripts/toolchain/execute-gcc-tests.sh "gcc-tests-${{ env.TAG }}" \
"${{ env.MODULE }}" "${{ env.FILTER }}"
- name: Create summary
run: |
source ~/work/.github/scripts/config.sh
~/work/.github/scripts/toolchain/create-gcc-summary.sh "${{ env.TAG }}" >> \
$ARTIFACT_PATH/gcc-tests-${{ env.TAG }}/summary.txt
- name: Present summary
shell: powershell
run: |
cat ${{ steps.get-wsl-paths.outputs.artifact-path }}\gcc-tests-${{ env.TAG }}\summary.txt >> $env:GITHUB_STEP_SUMMARY
~/work/.github/scripts/toolchain/create-gcc-summary.sh " \
${{ steps.get-wsl-paths.outputs.artifact-path }}/gcc-tests-${{ env.TAG }}" >> \
${{ steps.get-wsl-paths.outputs.artifact-path }}/gcc-tests-${{ env.TAG }}/summary.md
cat ${{ steps.get-wsl-paths.outputs.artifact-path }}/gcc-tests-${{ env.TAG }}/summary.md >> $GITHUB_STEP_SUMMARY
- name: Group test failures
run: |
~/work/.github/scripts/toolchain/group-gcc-test-failures.sh "${{ env.TAG }}" $GITHUB_STEP_SUMMARY
~/work/.github/scripts/toolchain/group-gcc-test-failures.sh "gcc-tests-${{ env.TAG }}" >> $GITHUB_STEP_SUMMARY
- name: Upload build folder
if: failure()
Expand Down

0 comments on commit 8486f89

Please sign in to comment.