From a643e533d8fbbbb868b698e7dedcfc9b332a3f31 Mon Sep 17 00:00:00 2001 From: Mrunal Patel Date: Mon, 2 Oct 2017 18:41:58 -0700 Subject: [PATCH] Skip building btrfs support if library isn't installed Signed-off-by: Mrunal Patel --- Makefile | 2 +- contrib/test/integration/e2e.yml | 3 +++ hack/btrfs_installed_tag.sh | 7 +++++++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100755 hack/btrfs_installed_tag.sh diff --git a/Makefile b/Makefile index 32619bab..ef6129eb 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ LIBEXECDIR ?= ${PREFIX}/libexec MANDIR ?= ${PREFIX}/share/man ETCDIR ?= ${DESTDIR}/etc ETCDIR_CRIO ?= ${ETCDIR}/crio -BUILDTAGS ?= selinux seccomp $(shell hack/btrfs_tag.sh) $(shell hack/libdm_tag.sh) +BUILDTAGS ?= selinux seccomp $(shell hack/btrfs_tag.sh) $(shell hack/libdm_tag.sh) $(shell hack/btrfs_installed_tag.sh) BASHINSTALLDIR=${PREFIX}/share/bash-completion/completions OCIUMOUNTINSTALLDIR=$(PREFIX)/share/oci-umount/oci-umount.d diff --git a/contrib/test/integration/e2e.yml b/contrib/test/integration/e2e.yml index de43e2ed..a95b2231 100644 --- a/contrib/test/integration/e2e.yml +++ b/contrib/test/integration/e2e.yml @@ -48,6 +48,9 @@ &> {{ artifacts }}/e2e.log # Fix vim syntax hilighting: " +- name: disable SELinux + command: setenforce 0 + - name: run e2e tests shell: "{{ e2e_shell_cmd | regex_replace('\\s+', ' ') }}" args: diff --git a/hack/btrfs_installed_tag.sh b/hack/btrfs_installed_tag.sh new file mode 100755 index 00000000..357f33b8 --- /dev/null +++ b/hack/btrfs_installed_tag.sh @@ -0,0 +1,7 @@ +#!/bin/bash +cc -E - > /dev/null 2> /dev/null << EOF +#include +EOF +if test $? -ne 0 ; then + echo exclude_graphdriver_btrfs +fi