Skip to content

Commit

Permalink
making travis working for both uzfs and kernel
Browse files Browse the repository at this point in the history
- now we will use ./configure --enable-uzfs=yes to compile
  for uZFS. By default it will compile for kernel.

- fixing make pkg-mod.

- installing gtest for travis and codecov

- adding gitignore for new binaries
  • Loading branch information
pawanpraka1 authored and Jan Kryl committed Jun 26, 2018
1 parent d7b7c19 commit 2d27bf6
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 12 deletions.
12 changes: 10 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@ before_install:
- sudo apt-get install lcov
# packages for tests
- sudo apt-get install --yes -qq parted lsscsi ksh attr acl nfs-kernel-server fio
- sudo apt-get install --yes -qq libgtest-dev cmake
install:
- pushd .
- cd /usr/src/gtest
- sudo cmake CMakeLists.txt
- sudo make
- sudo cp *.a /usr/lib
- popd
- cd ..
- git clone https://github.com/zfsonlinux/spl
- cd spl
Expand All @@ -31,10 +38,11 @@ install:
fi
- cd ../ZoL
- sh autogen.sh
- ./configure --enable-code-coverage=yes
- if [ $ZFS_BUILD_TAGS = 0 ]; then
./configure --enable-code-coverage=yes --enable-uzfs=yes;
make;
else
./configure --enable-code-coverage=yes;
make --no-print-directory -s pkg-utils pkg-kmod;
sudo dpkg -i *.deb;
fi
Expand All @@ -49,4 +57,4 @@ after_failure:
- find /var/tmp/test_results/current/log -type f -name '*' -printf "%f\n" -exec cut -c -$ZFS_TEST_TRAVIS_LOG_MAX_LENGTH {} \;
after_success:
- find /var/tmp/test_results/current/log -type f -name '*' -printf "%f\n" -exec cut -c -$ZFS_TEST_TRAVIS_LOG_MAX_LENGTH {} \;
- bash <(curl -s https://codecov.io/bash)
- bash <(curl -s https://codecov.io/bash)
1 change: 1 addition & 0 deletions cmd/tgt/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/tgt
2 changes: 0 additions & 2 deletions cmd/zfs/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
include $(top_srcdir)/config/Rules.am

AM_CFLAGS += -D_UZFS

DEFAULT_INCLUDES += \
-I$(top_srcdir)/include \
-I$(top_srcdir)/lib/libspl/include
Expand Down
2 changes: 0 additions & 2 deletions cmd/zpool/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
include $(top_srcdir)/config/Rules.am

AM_CFLAGS += -D_UZFS

DEFAULT_INCLUDES += \
-I$(top_srcdir)/include \
-I$(top_srcdir)/lib/libspl/include
Expand Down
4 changes: 2 additions & 2 deletions config/Rules.am
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ AM_CFLAGS += ${NO_UNUSED_BUT_SET_VARIABLE}
AM_CFLAGS += ${NO_BOOL_COMPARE}
AM_CFLAGS += -fno-strict-aliasing
AM_CFLAGS += -std=gnu99
AM_CFLAGS += $(CODE_COVERAGE_CFLAGS)
AM_CFLAGS += $(CODE_COVERAGE_CFLAGS) $(UZFS_CFLAGS)
AM_CPPFLAGS = -D_GNU_SOURCE -D__EXTENSIONS__ -D_REENTRANT
AM_CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS -D_FILE_OFFSET_BITS=64
AM_CPPFLAGS += -D_LARGEFILE64_SOURCE -DHAVE_LARGE_STACKS=1
Expand All @@ -15,4 +15,4 @@ AM_CPPFLAGS += -DLIBEXECDIR=\"$(libexecdir)\"
AM_CPPFLAGS += -DRUNSTATEDIR=\"$(runstatedir)\"
AM_CPPFLAGS += -DSBINDIR=\"$(sbindir)\"
AM_CPPFLAGS += -DSYSCONFDIR=\"$(sysconfdir)\"
AM_CPPFLAGS += $(CODE_COVERAGE_CPPFLAGS)
AM_CPPFLAGS += $(CODE_COVERAGE_CPPFLAGS) $(UZFS_CFLAGS)
14 changes: 14 additions & 0 deletions config/zol-uzfs.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
AC_DEFUN([ZFS_ZOL_UZFS], [
AC_ARG_ENABLE(uzfs,
AC_HELP_STRING([--enable-uzfs],
[create user space binaries [[default: no]]]),
[],enable_uzfs=no)
AS_IF([test "x$enable_uzfs" = xyes],
[
UZFS_CFLAGS="-D_UZFS -Werror"
])
AC_SUBST(UZFS_CFLAGS)
AC_MSG_RESULT([$enable_uzfs])
])
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ ZFS_AC_PACKAGE
ZFS_AC_CONFIG
ZFS_AC_DEBUG
ZFS_AC_DEBUGINFO
ZFS_ZOL_UZFS

AC_CONFIG_FILES([
Makefile
Expand Down
2 changes: 2 additions & 0 deletions include/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ USER_H = \
$(top_srcdir)/include/libuutil.h \
$(top_srcdir)/include/libuutil_impl.h \
$(top_srcdir)/include/libzfs.h \
$(top_srcdir)/include/libuzfs.h \
$(top_srcdir)/include/gtest_helper.h \
$(top_srcdir)/include/libzfs_core.h \
$(top_srcdir)/include/libzfs_impl.h

Expand Down
2 changes: 0 additions & 2 deletions lib/libzfs/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
include $(top_srcdir)/config/Rules.am

AM_CFLAGS += -D_UZFS

libzfs_pcdir = $(datarootdir)/pkgconfig
libzfs_pc_DATA = libzfs.pc libzfs_core.pc

Expand Down
2 changes: 0 additions & 2 deletions lib/libzfs_core/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
include $(top_srcdir)/config/Rules.am

AM_CFLAGS += -D_UZFS

DEFAULT_INCLUDES += \
-I$(top_srcdir)/include \
-I$(top_srcdir)/lib/libspl/include
Expand Down
1 change: 1 addition & 0 deletions tests/cbtest/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/test_uzfs

0 comments on commit 2d27bf6

Please sign in to comment.