summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhaedrus Leeds <matthew.leeds@endlessm.com>2020-08-24 17:06:56 -0700
committerGitHub <noreply@github.com>2020-08-24 17:06:56 -0700
commit082f50eefa5ff94384108f57bed7252b28c46678 (patch)
tree477c25df1a1cbaffd9775f97eb10a167ee786469
parent78a2e45610db3b33d198dcb03666530e60d3b5c0 (diff)
parent946cf126b73cb9eb0f1638d8b29ea2e272698d8d (diff)
downloadflatpak-082f50eefa5ff94384108f57bed7252b28c46678.tar.gz
Merge pull request #3809 from alexlarsson/valgrind-ci
CI: Add a valgrind check
-rw-r--r--.github/workflows/check.yml54
-rw-r--r--tests/flatpak.supp9
2 files changed, 59 insertions, 4 deletions
diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml
index 74daa4b9..08a6e6f5 100644
--- a/.github/workflows/check.yml
+++ b/.github/workflows/check.yml
@@ -25,8 +25,6 @@ jobs:
steps:
- name: Install Dependencies
run: |
- # Work around github repo bug (see https://github.community/t5/GitHub-Actions/ubuntu-latest-Apt-repository-list-issues/m-p/41163/highlight/true#M4513)
- for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done
sudo add-apt-repository ppa:alexlarsson/flatpak
sudo add-apt-repository ppa:alexlarsson/glib260
sudo apt-get update
@@ -87,8 +85,6 @@ jobs:
steps:
- name: Install Dependencies
run: |
- # Work around github repo bug (see https://github.community/t5/GitHub-Actions/ubuntu-latest-Apt-repository-list-issues/m-p/41163/highlight/true#M4513)
- for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done
sudo add-apt-repository ppa:alexlarsson/flatpak
sudo add-apt-repository ppa:alexlarsson/glib260
sudo apt-get update
@@ -133,3 +129,53 @@ jobs:
CFLAGS: -Werror=unused-variable
- name: Build flatpak
run: make -j $(getconf _NPROCESSORS_ONLN)
+
+ valgrind:
+ name: Run tests in valgrind
+ needs: check # Don't run expensive test if main check fails
+ runs-on: ubuntu-20.04 # Might as well test with a different one too
+ steps:
+ - name: Install Dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y libglib2.0 attr automake gettext autopoint bison dbus gtk-doc-tools \
+ libfuse-dev ostree libostree-dev libarchive-dev libzstd-dev libcap-dev libattr1-dev libdw-dev libelf-dev python3-pyparsing \
+ libjson-glib-dev shared-mime-info desktop-file-utils libpolkit-agent-1-dev libpolkit-gobject-1-dev \
+ libseccomp-dev libsoup2.4-dev libsystemd-dev libxml2-utils libgpgme11-dev gobject-introspection \
+ libgirepository1.0-dev libappstream-glib-dev libdconf-dev clang socat meson libdbus-1-dev \
+ valgrind
+ - name: Check out flatpak
+ uses: actions/checkout@v1
+ with:
+ submodules: true
+ - name: Create logs dir
+ run: mkdir test-logs
+ - name: autogen.sh
+ run: NOCONFIGURE=1 ./autogen.sh
+ - name: configure
+ # TODO: Enable gtk-doc builds
+ run: |
+ mkdir _build
+ pushd _build
+ ../configure
+ popd
+ env:
+ CFLAGS: -O2
+ - name: Build flatpak
+ run: make -C _build -j $(getconf _NPROCESSORS_ONLN)
+ - name: Run tests
+ run: make -C _build check
+ env:
+ FLATPAK_TESTS_VALGRIND: true
+ - name: Collect overall test logs on failure
+ if: failure()
+ run: mv _build/test-suite.log test-logs/ || true
+ - name: Collect individual test logs on cancel
+ if: failure() || cancelled()
+ run: mv _build/tests/*.log test-logs/ || true
+ - name: Upload test logs
+ uses: actions/upload-artifact@v1
+ if: failure() || cancelled()
+ with:
+ name: test logs
+ path: test-logs
diff --git a/tests/flatpak.supp b/tests/flatpak.supp
index 4736b870..aae8ae16 100644
--- a/tests/flatpak.supp
+++ b/tests/flatpak.supp
@@ -156,6 +156,15 @@
fun:_check_support_reflink
}
+# Some unsupported ioctl
+{
+ ignore_ostree_write_ioctl
+ Memcheck:Param
+ ioctl(generic)
+ fun:ioctl
+ obj:*/libostree-1.so.1.0.0
+}
+
# ostree pthread_create issue
{
ostree_pthread_create_issue