public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [RFC PATCH v3 0/5] Travis enhancements
@ 2017-12-04 12:25 Petr Vorel
  2017-12-04 12:25 ` [LTP] [RFC PATCH v3 1/5] travis: Add build script and use it in travis Petr Vorel
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Petr Vorel @ 2017-12-04 12:25 UTC (permalink / raw)
  To: ltp

Hi,

see
https://travis-ci.org/pevik-travis/ltp/builds/311256334

Changes v2->v3:
* Changing prefix directory to 'ltp-install'. Previous ltp failed, if
  repository was clonned to the root of home directory.  Reported by Li Wang
  (thanks!).

Petr Vorel (5):
  travis: Add build script and use it in travis
  travis: Drop old compilers, add new ones
  travis: Add 32-bit cross-compile builds
  travis: Add out-of-tree build
  travis: Install all dependencies + add build with minimal dependencies

 .travis.packages_i386   |   9 ++++
 .travis.packages_native |  18 ++++++++
 .travis.yml             |  87 +++++++++++++++++++++++++++-----------
 build.sh                | 110 ++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 200 insertions(+), 24 deletions(-)
 create mode 100644 .travis.packages_i386
 create mode 100644 .travis.packages_native
 create mode 100755 build.sh

-- 
2.15.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [LTP] [RFC PATCH v3 1/5] travis: Add build script and use it in travis
  2017-12-04 12:25 [LTP] [RFC PATCH v3 0/5] Travis enhancements Petr Vorel
@ 2017-12-04 12:25 ` Petr Vorel
  2017-12-04 17:15   ` Cyril Hrubis
  2017-12-05  4:32   ` Li Wang
  2017-12-04 12:25 ` [LTP] [RFC PATCH v3 2/5] travis: Drop old compilers, add new ones Petr Vorel
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 11+ messages in thread
From: Petr Vorel @ 2017-12-04 12:25 UTC (permalink / raw)
  To: ltp

This script handles native build, 32-bit cross-compile build and
out-of-tree build.

Script is for travis build, but can be used for local builds as well.

For usage run
./build.sh -h

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 .travis.yml |   2 +-
 build.sh    | 110 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 111 insertions(+), 1 deletion(-)
 create mode 100755 build.sh

diff --git a/.travis.yml b/.travis.yml
index d937f9dcf..f2d51f131 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -72,4 +72,4 @@ notifications:
     email:
         secure: "b/xcA/K5OyQvPPnd0PRahTH5LJu8lgz8goGHvhXpHo+ZPsPgTDXNFo5cX9fSOkMuFKeoW8iGl0wOgK2+ptc8mbYDw277K4RFIHRHeV/KIoE1EzjQnEFiL8J0oHCAvDj12o0AXeriTyY9gICXKbR31Br6Zh5eKViDJe2OAGeHeDU="
 
-script: make autotools && ./configure --prefix $HOME/ltp --with-open-posix-testsuite --with-realtime-testsuite && make -j$(getconf _NPROCESSORS_ONLN) && make -j$(getconf _NPROCESSORS_ONLN) install
+script: ./build.sh
diff --git a/build.sh b/build.sh
new file mode 100755
index 000000000..5aaa79ad0
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,110 @@
+#!/bin/sh
+# Copyright (c) 2017 Petr Vorel <pvorel@suse.cz>
+# Script for travis builds.
+#
+# TODO: Implement comparison of installed files. List of installed files can
+# be used only for local builds as Travis currently doesn't support sharing
+# file between jobs, see
+# https://github.com/travis-ci/travis-ci/issues/6054
+
+set -e
+
+PREFIX="$HOME/ltp-install"
+
+CONFIGURE_OPTS_IN_TREE="--with-open-posix-testsuite --with-realtime-testsuite --prefix=$PREFIX"
+
+# TODO: open posix testsuite is currently broken in out-tree-build. Enable it once it's fixed.
+CONFIGURE_OPTS_OUT_TREE="--with-realtime-testsuite"
+
+MAKE_OPTS="-j$(getconf _NPROCESSORS_ONLN)"
+
+build_32()
+{
+	echo "===== 32-bit in-tree build into $PREFIX ====="
+	build_in_tree CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32"
+}
+
+build_native()
+{
+	echo "===== native in tree build into $PREFIX ====="
+	build_in_tree
+}
+
+build_out_tree()
+{
+	local tree="$PWD"
+	local build="$tree/../ltp-build"
+	local make_opts="$MAKE_OPTS -C $build -f $tree/Makefile top_srcdir=$tree top_builddir=$build"
+
+	echo "===== native out-of-tree build into $PREFIX ====="
+	mkdir -p $build
+
+	echo "=== autotools ==="
+	make autotools
+
+	cd $build
+	if ! $tree/configure $CONFIGURE_OPTS; then
+		echo "== ERROR: configure failed, config.log =="
+		cat config.log
+		exit 1
+	fi
+
+	echo "== config.log =="
+	cat config.log
+
+    make $make_opts
+    make $make_opts DESTDIR="$PREFIX" SKIP_IDCHECK=1 install
+}
+
+build_in_tree()
+{
+	echo "=== autotools ==="
+	make autotools
+
+	echo "=== configure ==="
+	if ! ./configure $CONFIGURE_OPTS_IN_TREE $@; then
+		echo "== ERROR: configure failed, config.log =="
+		cat config.log
+		exit 1
+	fi
+
+	echo "== config.log =="
+	cat config.log
+
+	echo "=== build ==="
+	make $MAKE_OPTS
+
+	echo "=== install ==="
+	make $MAKE_OPTS install
+}
+
+usage()
+{
+	cat << EOF
+Usage:
+$0 [ BUILD_TYPE ]
+$0 -h|--help|help
+
+Options:
+-h|--help|help  Print this help
+
+BUILD TYPES:
+32      32-bit in-tree build
+native  native in-tree build
+out     out-of-tree build
+
+Default build is native in-tree build.
+EOF
+}
+
+case "$1" in
+	-h|--help|help) usage; exit 0;;
+	32) build="build_32";;
+	out) build="build_out_tree";;
+	*) build="build_native";;
+esac
+
+cd `dirname $0`
+$build
+
+# vim: set ft=sh ts=4 sts=4 sw=4 noet:
-- 
2.15.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [LTP] [RFC PATCH v3 2/5] travis: Drop old compilers, add new ones
  2017-12-04 12:25 [LTP] [RFC PATCH v3 0/5] Travis enhancements Petr Vorel
  2017-12-04 12:25 ` [LTP] [RFC PATCH v3 1/5] travis: Add build script and use it in travis Petr Vorel
@ 2017-12-04 12:25 ` Petr Vorel
  2017-12-04 12:25 ` [LTP] [RFC PATCH v3 3/5] travis: Add 32-bit cross-compile builds Petr Vorel
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Petr Vorel @ 2017-12-04 12:25 UTC (permalink / raw)
  To: ltp

Dropped: gcc 4.6, 4.7, 4.8 and clang 3.5, 3.8
Added: gcc 6, 7 and clang 4.0, 5.0

+ simplify code for clang 3.9 as distro trusty is default in travis
since August 2017, see:
https://docs.travis-ci.com/user/reference/overview/

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 .travis.yml | 49 ++++++++++++++++---------------------------------
 1 file changed, 16 insertions(+), 33 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index f2d51f131..8aea22d01 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,27 +2,6 @@ language: c
 
 matrix:
     include:
-        - os: linux
-          compiler: gcc-4.6
-          addons:
-              apt:
-                  sources: ['ubuntu-toolchain-r-test']
-                  packages: ['gcc-4.6']
-
-        - os: linux
-          compiler: gcc-4.7
-          addons:
-              apt:
-                  sources: ['ubuntu-toolchain-r-test']
-                  packages: ['gcc-4.7']
-
-        - os: linux
-          compiler: gcc-4.8
-          addons:
-              apt:
-                  sources: ['ubuntu-toolchain-r-test']
-                  packages: ['gcc-4.8']
-
         - os: linux
           compiler: gcc-4.9
           addons:
@@ -45,28 +24,32 @@ matrix:
                   packages: ['gcc-6']
 
         - os: linux
-          compiler: clang-3.5
+          compiler: gcc-7
+          addons:
+              apt:
+                  sources: ['ubuntu-toolchain-r-test']
+                  packages: ['gcc-7']
+
+        - os: linux
+          compiler: clang-3.9
           addons:
               apt:
-                  sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.5']
-                  packages: ['clang-3.5']
+                  sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-3.9']
+                  packages: ['clang-3.9']
 
         - os: linux
-          compiler: clang-3.8
+          compiler: clang-4.0
           addons:
               apt:
-                  sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.8']
-                  packages: ['clang-3.8']
+                  sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-4.0']
+                  packages: ['clang-4.0']
 
         - os: linux
-          compiler: clang-3.9
+          compiler: clang-5.0
           addons:
               apt:
-                  sources:
-                      - sourceline: "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.9 main"
-                        key_url: "http://apt.llvm.org/llvm-snapshot.gpg.key"
-                      - 'ubuntu-toolchain-r-test'
-                  packages: ['clang-3.9']
+                  sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-5.0']
+                  packages: ['clang-5.0']
 
 notifications:
     email:
-- 
2.15.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [LTP] [RFC PATCH v3 3/5] travis: Add 32-bit cross-compile builds
  2017-12-04 12:25 [LTP] [RFC PATCH v3 0/5] Travis enhancements Petr Vorel
  2017-12-04 12:25 ` [LTP] [RFC PATCH v3 1/5] travis: Add build script and use it in travis Petr Vorel
  2017-12-04 12:25 ` [LTP] [RFC PATCH v3 2/5] travis: Drop old compilers, add new ones Petr Vorel
@ 2017-12-04 12:25 ` Petr Vorel
  2017-12-04 12:25 ` [LTP] [RFC PATCH v3 4/5] travis: Add out-of-tree build Petr Vorel
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Petr Vorel @ 2017-12-04 12:25 UTC (permalink / raw)
  To: ltp

Choosen gcc 4.9 and 6 (to use old and some quite new version).

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 .travis.yml | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 8aea22d01..3ca37e47a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,6 +3,7 @@ language: c
 matrix:
     include:
         - os: linux
+          env: BUILD="native"
           compiler: gcc-4.9
           addons:
               apt:
@@ -10,6 +11,7 @@ matrix:
                   packages: ['gcc-4.9']
 
         - os: linux
+          env: BUILD="native"
           compiler: gcc-5
           addons:
               apt:
@@ -17,6 +19,7 @@ matrix:
                   packages: ['gcc-5']
 
         - os: linux
+          env: BUILD="native"
           compiler: gcc-6
           addons:
               apt:
@@ -24,6 +27,7 @@ matrix:
                   packages: ['gcc-6']
 
         - os: linux
+          env: BUILD="native"
           compiler: gcc-7
           addons:
               apt:
@@ -31,6 +35,7 @@ matrix:
                   packages: ['gcc-7']
 
         - os: linux
+          env: BUILD="native"
           compiler: clang-3.9
           addons:
               apt:
@@ -38,6 +43,7 @@ matrix:
                   packages: ['clang-3.9']
 
         - os: linux
+          env: BUILD="native"
           compiler: clang-4.0
           addons:
               apt:
@@ -45,14 +51,32 @@ matrix:
                   packages: ['clang-4.0']
 
         - os: linux
+          env: BUILD="native"
           compiler: clang-5.0
           addons:
               apt:
                   sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-5.0']
                   packages: ['clang-5.0']
 
+        - os: linux
+          env: BUILD="32"
+          compiler: gcc-4.9
+          addons:
+              apt:
+                  sources: ['ubuntu-toolchain-r-test']
+                  packages: ['gcc-4.9', 'gcc-4.9-multilib', 'linux-libc-dev:i386']
+
+        - os: linux
+          env: BUILD="32"
+          compiler: gcc-6
+          addons:
+              apt:
+                  sources: ['ubuntu-toolchain-r-test']
+                  packages: ['gcc-6', 'gcc-6-multilib', 'linux-libc-dev:i386']
+
 notifications:
     email:
         secure: "b/xcA/K5OyQvPPnd0PRahTH5LJu8lgz8goGHvhXpHo+ZPsPgTDXNFo5cX9fSOkMuFKeoW8iGl0wOgK2+ptc8mbYDw277K4RFIHRHeV/KIoE1EzjQnEFiL8J0oHCAvDj12o0AXeriTyY9gICXKbR31Br6Zh5eKViDJe2OAGeHeDU="
 
-script: ./build.sh
+before_install:
+script: ./build.sh $BUILD
-- 
2.15.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [LTP] [RFC PATCH v3 4/5] travis: Add out-of-tree build
  2017-12-04 12:25 [LTP] [RFC PATCH v3 0/5] Travis enhancements Petr Vorel
                   ` (2 preceding siblings ...)
  2017-12-04 12:25 ` [LTP] [RFC PATCH v3 3/5] travis: Add 32-bit cross-compile builds Petr Vorel
@ 2017-12-04 12:25 ` Petr Vorel
  2017-12-04 12:25 ` [LTP] [RFC PATCH v3 5/5] travis: Install all dependencies + add build with minimal dependencies Petr Vorel
  2017-12-04 17:18 ` [LTP] [RFC PATCH v3 0/5] Travis enhancements Cyril Hrubis
  5 siblings, 0 replies; 11+ messages in thread
From: Petr Vorel @ 2017-12-04 12:25 UTC (permalink / raw)
  To: ltp

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 .travis.yml | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index 3ca37e47a..cc5627412 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -74,6 +74,14 @@ matrix:
                   sources: ['ubuntu-toolchain-r-test']
                   packages: ['gcc-6', 'gcc-6-multilib', 'linux-libc-dev:i386']
 
+        - os: linux
+          env: BUILD="out"
+          compiler: gcc-7
+          addons:
+              apt:
+                  sources: ['ubuntu-toolchain-r-test']
+                  packages: ['gcc-7']
+
 notifications:
     email:
         secure: "b/xcA/K5OyQvPPnd0PRahTH5LJu8lgz8goGHvhXpHo+ZPsPgTDXNFo5cX9fSOkMuFKeoW8iGl0wOgK2+ptc8mbYDw277K4RFIHRHeV/KIoE1EzjQnEFiL8J0oHCAvDj12o0AXeriTyY9gICXKbR31Br6Zh5eKViDJe2OAGeHeDU="
-- 
2.15.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [LTP] [RFC PATCH v3 5/5] travis: Install all dependencies + add build with minimal dependencies
  2017-12-04 12:25 [LTP] [RFC PATCH v3 0/5] Travis enhancements Petr Vorel
                   ` (3 preceding siblings ...)
  2017-12-04 12:25 ` [LTP] [RFC PATCH v3 4/5] travis: Add out-of-tree build Petr Vorel
@ 2017-12-04 12:25 ` Petr Vorel
  2017-12-04 17:18 ` [LTP] [RFC PATCH v3 0/5] Travis enhancements Cyril Hrubis
  5 siblings, 0 replies; 11+ messages in thread
From: Petr Vorel @ 2017-12-04 12:25 UTC (permalink / raw)
  To: ltp

Currently travis has installed toolchain with libraries, glibc and
kernel headers so some of the packages listed are already installed.

Install all dependencies (headers and libraries).
The only exception is selinux support on 32bit build as as
libsepol1-dev:i386 conflict with libsepol1-dev for amd64, thus both
cannot be installed.

During reinstallation for build with minimal dependencies we need to
filter out some packages as toolchain package depends on it.

For minimal build chosen gcc 6 (relativelly recent gcc version, but not
too new).

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 .travis.packages_i386   |  9 +++++++++
 .travis.packages_native | 18 ++++++++++++++++++
 .travis.yml             | 44 ++++++++++++++++++++++++++++++++++----------
 3 files changed, 61 insertions(+), 10 deletions(-)
 create mode 100644 .travis.packages_i386
 create mode 100644 .travis.packages_native

diff --git a/.travis.packages_i386 b/.travis.packages_i386
new file mode 100644
index 000000000..725329041
--- /dev/null
+++ b/.travis.packages_i386
@@ -0,0 +1,9 @@
+libacl1:i386
+libaio1:i386
+libcap2:i386
+libc6-dev-i386
+libc6:i386
+libkeyutils1:i386
+libnuma1:i386
+libssl-dev:i386
+libtirpc1:i386
diff --git a/.travis.packages_native b/.travis.packages_native
new file mode 100644
index 000000000..d9e1a2acc
--- /dev/null
+++ b/.travis.packages_native
@@ -0,0 +1,18 @@
+libacl1
+libacl1-dev
+libaio-dev
+libaio1
+libcap-dev
+libcap2
+libc6
+libc6-dev
+libkeyutils-dev
+libkeyutils1
+libmm-dev
+libnuma-dev
+libnuma1
+libselinux1-dev
+libsepol1-dev
+libssl-dev
+libtirpc1
+linux-libc-dev
diff --git a/.travis.yml b/.travis.yml
index cc5627412..da79e1f9d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,8 +2,10 @@ language: c
 
 matrix:
     include:
+
+        # normal native in-tree builds
         - os: linux
-          env: BUILD="native"
+          env: BUILD="native" INSTALL_PACKAGES="$BUILD"
           compiler: gcc-4.9
           addons:
               apt:
@@ -11,7 +13,7 @@ matrix:
                   packages: ['gcc-4.9']
 
         - os: linux
-          env: BUILD="native"
+          env: BUILD="native" INSTALL_PACKAGES="$BUILD"
           compiler: gcc-5
           addons:
               apt:
@@ -19,7 +21,7 @@ matrix:
                   packages: ['gcc-5']
 
         - os: linux
-          env: BUILD="native"
+          env: BUILD="native" INSTALL_PACKAGES="$BUILD"
           compiler: gcc-6
           addons:
               apt:
@@ -27,7 +29,7 @@ matrix:
                   packages: ['gcc-6']
 
         - os: linux
-          env: BUILD="native"
+          env: BUILD="native" INSTALL_PACKAGES="$BUILD"
           compiler: gcc-7
           addons:
               apt:
@@ -35,7 +37,7 @@ matrix:
                   packages: ['gcc-7']
 
         - os: linux
-          env: BUILD="native"
+          env: BUILD="native" INSTALL_PACKAGES="$BUILD"
           compiler: clang-3.9
           addons:
               apt:
@@ -43,7 +45,7 @@ matrix:
                   packages: ['clang-3.9']
 
         - os: linux
-          env: BUILD="native"
+          env: BUILD="native" INSTALL_PACKAGES="$BUILD"
           compiler: clang-4.0
           addons:
               apt:
@@ -51,15 +53,25 @@ matrix:
                   packages: ['clang-4.0']
 
         - os: linux
-          env: BUILD="native"
+          env: BUILD="native" INSTALL_PACKAGES="$BUILD"
           compiler: clang-5.0
           addons:
               apt:
                   sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-5.0']
                   packages: ['clang-5.0']
 
+        # minimal build (some headers and libraries are missing)
+        - os: linux
+          env: BUILD="native"
+          compiler: gcc-6
+          addons:
+              apt:
+                  sources: ['ubuntu-toolchain-r-test']
+                  packages: ['gcc-6']
+
+        # 32-bit in-tree cross-compile builds
         - os: linux
-          env: BUILD="32"
+          env: BUILD="32" INSTALL_PACKAGES="$BUILD"
           compiler: gcc-4.9
           addons:
               apt:
@@ -67,15 +79,16 @@ matrix:
                   packages: ['gcc-4.9', 'gcc-4.9-multilib', 'linux-libc-dev:i386']
 
         - os: linux
-          env: BUILD="32"
+          env: BUILD="32" INSTALL_PACKAGES="$BUILD"
           compiler: gcc-6
           addons:
               apt:
                   sources: ['ubuntu-toolchain-r-test']
                   packages: ['gcc-6', 'gcc-6-multilib', 'linux-libc-dev:i386']
 
+        # out-of-tree build
         - os: linux
-          env: BUILD="out"
+          env: BUILD="out" INSTALL_PACKAGES="native"
           compiler: gcc-7
           addons:
               apt:
@@ -87,4 +100,15 @@ notifications:
         secure: "b/xcA/K5OyQvPPnd0PRahTH5LJu8lgz8goGHvhXpHo+ZPsPgTDXNFo5cX9fSOkMuFKeoW8iGl0wOgK2+ptc8mbYDw277K4RFIHRHeV/KIoE1EzjQnEFiL8J0oHCAvDj12o0AXeriTyY9gICXKbR31Br6Zh5eKViDJe2OAGeHeDU="
 
 before_install:
+    # installing / removing dependencies
+    - if [ "$INSTALL_PACKAGES" = "" ]; then
+          sudo apt remove $(cat .travis.packages_native | grep -v -e 'libc6' -e 'libc6-dev' -e 'linux-libc-dev' -e 'libacl1')
+      ; else
+          sudo apt install -qq $(cat .travis.packages_native)
+      ; fi
+
+    - if [ "$INSTALL_PACKAGES" = "32" ]; then
+          sudo apt install -qq $(cat .travis.packages_i386)
+      ; fi
+
 script: ./build.sh $BUILD
-- 
2.15.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [LTP] [RFC PATCH v3 1/5] travis: Add build script and use it in travis
  2017-12-04 12:25 ` [LTP] [RFC PATCH v3 1/5] travis: Add build script and use it in travis Petr Vorel
@ 2017-12-04 17:15   ` Cyril Hrubis
  2017-12-04 20:49     ` Petr Vorel
  2017-12-05  4:32   ` Li Wang
  1 sibling, 1 reply; 11+ messages in thread
From: Cyril Hrubis @ 2017-12-04 17:15 UTC (permalink / raw)
  To: ltp

Hi!
Hi!
> +	cd $build
> +	if ! $tree/configure $CONFIGURE_OPTS; then
> +		echo "== ERROR: configure failed, config.log =="
> +		cat config.log
> +		exit 1
> +	fi
> +
> +	echo "== config.log =="
> +	cat config.log

I find this output to be a bit too verbose, frankly I do not remeber
checking it content of the config.log ever.

> +    make $make_opts
> +    make $make_opts DESTDIR="$PREFIX" SKIP_IDCHECK=1 install
   ^
   Here you use spaces instead of tabs.

> +}
> +
> +build_in_tree()
> +{
> +	echo "=== autotools ==="
> +	make autotools
> +
> +	echo "=== configure ==="
> +	if ! ./configure $CONFIGURE_OPTS_IN_TREE $@; then
> +		echo "== ERROR: configure failed, config.log =="
> +		cat config.log
> +		exit 1
> +	fi
> +
> +	echo "== config.log =="
> +	cat config.log

Here as well.

> +	echo "=== build ==="
> +	make $MAKE_OPTS
> +
> +	echo "=== install ==="
> +	make $MAKE_OPTS install
> +}
> +
> +usage()
> +{
> +	cat << EOF
> +Usage:
> +$0 [ BUILD_TYPE ]
> +$0 -h|--help|help
> +
> +Options:
> +-h|--help|help  Print this help
> +
> +BUILD TYPES:
> +32      32-bit in-tree build
> +native  native in-tree build
> +out     out-of-tree build
> +
> +Default build is native in-tree build.
> +EOF
> +}
> +
> +case "$1" in
> +	-h|--help|help) usage; exit 0;;
> +	32) build="build_32";;
> +	out) build="build_out_tree";;
> +	*) build="build_native";;
> +esac
> +
> +cd `dirname $0`
> +$build
> +
> +# vim: set ft=sh ts=4 sts=4 sw=4 noet:

I prefer not to clobber source code with this kind of editor hints.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [LTP] [RFC PATCH v3 0/5] Travis enhancements
  2017-12-04 12:25 [LTP] [RFC PATCH v3 0/5] Travis enhancements Petr Vorel
                   ` (4 preceding siblings ...)
  2017-12-04 12:25 ` [LTP] [RFC PATCH v3 5/5] travis: Install all dependencies + add build with minimal dependencies Petr Vorel
@ 2017-12-04 17:18 ` Cyril Hrubis
  5 siblings, 0 replies; 11+ messages in thread
From: Cyril Hrubis @ 2017-12-04 17:18 UTC (permalink / raw)
  To: ltp

Hi!
Other than the minor nits the rest looks good, acked.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [LTP] [RFC PATCH v3 1/5] travis: Add build script and use it in travis
  2017-12-04 17:15   ` Cyril Hrubis
@ 2017-12-04 20:49     ` Petr Vorel
  2017-12-06 10:20       ` Cyril Hrubis
  0 siblings, 1 reply; 11+ messages in thread
From: Petr Vorel @ 2017-12-04 20:49 UTC (permalink / raw)
  To: ltp

Hi Cyril,

thanks for your time!

> I find this output to be a bit too verbose, frankly I do not remeber
> checking it content of the config.log ever.
It is verbose. The reason I added it is, that we can check that travis is doing what we
want (e.g. header / library is really installed / not installed).
I didn't realize, that include/config.h would be enough and it's much smaller.
But I suppose you don't want any output in case of successful configure run, do you?

> > +    make $make_opts
> > +    make $make_opts DESTDIR="$PREFIX" SKIP_IDCHECK=1 install
>    ^
>    Here you use spaces instead of tabs.
Thanks. Copy & paste issue.

> > +}
> > +
> > +build_in_tree()
> > +{
> > +	echo "=== autotools ==="
> > +	make autotools
> > +
> > +	echo "=== configure ==="
> > +	if ! ./configure $CONFIGURE_OPTS_IN_TREE $@; then
> > +		echo "== ERROR: configure failed, config.log =="
> > +		cat config.log
> > +		exit 1
> > +	fi
> > +
> > +	echo "== config.log =="
> > +	cat config.log

> Here as well.

> > +# vim: set ft=sh ts=4 sts=4 sw=4 noet:

> I prefer not to clobber source code with this kind of editor hints.
OK.


Kind regards,
Petr

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [LTP] [RFC PATCH v3 1/5] travis: Add build script and use it in travis
  2017-12-04 12:25 ` [LTP] [RFC PATCH v3 1/5] travis: Add build script and use it in travis Petr Vorel
  2017-12-04 17:15   ` Cyril Hrubis
@ 2017-12-05  4:32   ` Li Wang
  1 sibling, 0 replies; 11+ messages in thread
From: Li Wang @ 2017-12-05  4:32 UTC (permalink / raw)
  To: ltp

build.sh V3 works fine to me. Thanks!


-- 
Li Wang
liwang@redhat.com

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [LTP] [RFC PATCH v3 1/5] travis: Add build script and use it in travis
  2017-12-04 20:49     ` Petr Vorel
@ 2017-12-06 10:20       ` Cyril Hrubis
  0 siblings, 0 replies; 11+ messages in thread
From: Cyril Hrubis @ 2017-12-06 10:20 UTC (permalink / raw)
  To: ltp

Hi!
> > I find this output to be a bit too verbose, frankly I do not remeber
> > checking it content of the config.log ever.
> It is verbose. The reason I added it is, that we can check that travis is doing what we
> want (e.g. header / library is really installed / not installed).
> I didn't realize, that include/config.h would be enough and it's much smaller.
> But I suppose you don't want any output in case of successful configure run, do you?

Dumping config.h sounds good to me.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-12-06 10:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-04 12:25 [LTP] [RFC PATCH v3 0/5] Travis enhancements Petr Vorel
2017-12-04 12:25 ` [LTP] [RFC PATCH v3 1/5] travis: Add build script and use it in travis Petr Vorel
2017-12-04 17:15   ` Cyril Hrubis
2017-12-04 20:49     ` Petr Vorel
2017-12-06 10:20       ` Cyril Hrubis
2017-12-05  4:32   ` Li Wang
2017-12-04 12:25 ` [LTP] [RFC PATCH v3 2/5] travis: Drop old compilers, add new ones Petr Vorel
2017-12-04 12:25 ` [LTP] [RFC PATCH v3 3/5] travis: Add 32-bit cross-compile builds Petr Vorel
2017-12-04 12:25 ` [LTP] [RFC PATCH v3 4/5] travis: Add out-of-tree build Petr Vorel
2017-12-04 12:25 ` [LTP] [RFC PATCH v3 5/5] travis: Install all dependencies + add build with minimal dependencies Petr Vorel
2017-12-04 17:18 ` [LTP] [RFC PATCH v3 0/5] Travis enhancements Cyril Hrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox