From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7840) id 9695E3847816; Thu, 27 May 2021 01:19:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9695E3847816 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Eugene Rozenfeld To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/vendors/microsoft/heads/main)] Run gcc tests with verbose output (#46) X-Act-Checkin: gcc X-Git-Author: Victor Tong <53017530+vitong@users.noreply.github.com> X-Git-Refname: refs/vendors/microsoft/heads/main X-Git-Oldrev: 8592b3b20517b33f8ccc0911539145e15d7ae8b3 X-Git-Newrev: 32511846a044cfad51749fd1ef032241f447a7d1 Message-Id: <20210527011956.9695E3847816@sourceware.org> Date: Thu, 27 May 2021 01:19:56 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 May 2021 01:19:56 -0000 https://gcc.gnu.org/g:32511846a044cfad51749fd1ef032241f447a7d1 commit 32511846a044cfad51749fd1ef032241f447a7d1 Author: Victor Tong <53017530+vitong@users.noreply.github.com> Date: Wed Apr 21 14:16:59 2021 -0700 Run gcc tests with verbose output (#46) * Run gcc tests with verbose output enabled. Output will be written to a file to avoid overflowing the run console window. Failures will be printed in the console and also available in a separate file. Both output and failures files will be uploaded as artifacts of the test-gcc workflow * Add fortran to be included in the gcc configuration. That's what Mariner uses Diff: --- .github/scripts/build-gcc.sh | 2 +- .github/scripts/configure-gcc.sh | 2 +- .github/scripts/test-gcc.sh | 11 +++++++++-- .github/workflows/fetch-rebase-test.yaml | 9 +++++++++ .github/workflows/test-gcc.yaml | 9 +++++++++ 5 files changed, 29 insertions(+), 4 deletions(-) diff --git a/.github/scripts/build-gcc.sh b/.github/scripts/build-gcc.sh index 7614a88daa2..4b9da469daf 100644 --- a/.github/scripts/build-gcc.sh +++ b/.github/scripts/build-gcc.sh @@ -1,6 +1,6 @@ cd ../objdir -$PWD/../gcc/configure --prefix=$HOME/GCC --enable-languages=c,c++ +$PWD/../gcc/configure --prefix=$HOME/GCC --enable-languages=c,c++,fortran exit_code=$? if [ $exit_code != 0 ]; then diff --git a/.github/scripts/configure-gcc.sh b/.github/scripts/configure-gcc.sh index 655a4ced9b0..319eae9536e 100644 --- a/.github/scripts/configure-gcc.sh +++ b/.github/scripts/configure-gcc.sh @@ -1,7 +1,7 @@ sudo apt update # Install gcc 7 and g++ 7 -sudo apt-get install gcc-7 g++-7 g++-7-multilib libstdc++-7-doc binutils-doc build-essential cpp-doc gcc-7-doc libstdc++6-7-dbg lib32stdc++6-7-dbg libx32stdc++6-7-dbg make autoconf automake libtool flex bison gdb gcc-doc libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan4-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx2-dbg libquadmath0-dbg glibc-doc python +sudo apt-get install gcc-7 g++-7 g++-7-multilib libstdc++-7-doc binutils-doc build-essential cpp-doc gcc-7-doc libstdc++6-7-dbg lib32stdc++6-7-dbg libx32stdc++6-7-dbg make autoconf automake libtool flex bison gdb gawk gcc-doc gfortran libgfortran3 libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan4-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx2-dbg libquadmath0-dbg glibc-doc python -y # Redirect gcc and g++ to the installed versions sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 diff --git a/.github/scripts/test-gcc.sh b/.github/scripts/test-gcc.sh index 1ccfc396eb6..d8e5359932d 100644 --- a/.github/scripts/test-gcc.sh +++ b/.github/scripts/test-gcc.sh @@ -1,11 +1,18 @@ cd ../objdir chmod +x $PWD -R +mkdir logs -make -k $1 -j$(nproc) #RUNTESTFLAGS="-v -v" -../gcc/contrib/testsuite-management/validate_failures.py +# Run tests +make -k $1 -j$(nproc) RUNTESTFLAGS="-v -v" 2>&1 >> logs/output.txt 2>&1 +# Compare failures found to the failures that we're expecting +../gcc/contrib/testsuite-management/validate_failures.py >> logs/failures.txt 2>&1 exit_code=$? + +# Print failures to console output so they can be viewed in the GitHub Action run +cat logs/failures.txt + if [ $exit_code != 0 ]; then exit $exit_code fi diff --git a/.github/workflows/fetch-rebase-test.yaml b/.github/workflows/fetch-rebase-test.yaml index ef9abc703bb..f41ba70c98f 100644 --- a/.github/workflows/fetch-rebase-test.yaml +++ b/.github/workflows/fetch-rebase-test.yaml @@ -119,3 +119,12 @@ jobs: testSet: ${{ matrix.testSet }} githubtoken: ${{ secrets.GITHUB_TOKEN }} buildDownloaded: True + + - name: Move objdir to be in repo so logs inside can be uploaded + run: mv ../objdir objdir + + - name: Upload build output + uses: actions/upload-artifact@v2 + with: + name: ${{ matrix.testSet }}_logs + path: objdir/logs \ No newline at end of file diff --git a/.github/workflows/test-gcc.yaml b/.github/workflows/test-gcc.yaml index 831b171a2d2..9d54cfcf52d 100644 --- a/.github/workflows/test-gcc.yaml +++ b/.github/workflows/test-gcc.yaml @@ -110,4 +110,13 @@ jobs: testSet: ${{ matrix.testSet }} githubtoken: ${{ secrets.GITHUB_TOKEN }} buildDownloaded: False + + - name: Move objdir to be in repo so logs inside can be uploaded + run: mv ../objdir objdir + + - name: Upload build output + uses: actions/upload-artifact@v2 + with: + name: ${{ matrix.testSet }}_logs + path: objdir/logs