public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Eugene Rozenfeld <erozen@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/vendors/microsoft/heads/main)] Run gcc tests with verbose output (#46)
Date: Thu, 27 May 2021 01:19:56 +0000 (GMT)	[thread overview]
Message-ID: <20210527011956.9695E3847816@sourceware.org> (raw)

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


                 reply	other threads:[~2021-05-27  1:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210527011956.9695E3847816@sourceware.org \
    --to=erozen@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).