All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [RFC PATCH v2 0/5] Travis enhancements
@ 2017-12-01 15:46 Petr Vorel
  2017-12-01 15:46 ` [LTP] [RFC PATCH v2 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-01 15:46 UTC (permalink / raw)
  To: ltp

TL;DR
See https://travis-ci.org/pevik-travis/ltp/builds/310089523

Now we have 11 jobs testing 7 compilers in 3 different ways (mostly normal
builds, 2x 32-bit cross-compile builds, 1x out-of-tree build, 1x build with
minimal dependencies).

It seems to be rule running only 5 containers at a time, so 11th build slowes
building about 4 min (18 min vs. 22 min). Which build would you remove?

I decided to specify dependencies in file (saves some duplicity).
These files can be used for builds on Debian/Ubuntu (as we re

Changes v1->v2:
* Dropped compilers:
  Dropped: gcc 4.6, 4.7, 4.8 and clang 3.5, 3.8
* Added different types of builds (32-bit cross-compile builds, out-of-tree build)
* Better handling of header and library dependencies (minimal build and build with full support).
* Minor changes.

Notes what I learned:
* Travis needs sudo for using apt, but it does not allow to use it in script
  (it must be in travis.yml)
* Don't use $INSTALL environment variable (I haven't figured how, but it
  reported build to be failed).


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                | 111 ++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 201 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 v2 1/5] travis: Add build script and use it in travis
  2017-12-01 15:46 [LTP] [RFC PATCH v2 0/5] Travis enhancements Petr Vorel
@ 2017-12-01 15:46 ` Petr Vorel
  2017-12-04  9:55   ` Li Wang
  2017-12-01 15:46 ` [LTP] [RFC PATCH v2 2/5] travis: Drop old compilers, add new ones Petr Vorel
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Petr Vorel @ 2017-12-01 15:46 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    | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 112 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..9e057f73b
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,111 @@
+#!/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"
+
+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 dest="$tree/../ltp-install"
+	local make_opts="$MAKE_OPTS -C $build -f $tree/Makefile top_srcdir=$tree top_builddir=$build"
+
+	echo "===== native out-of-tree build into $dest ====="
+	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="$dest" 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 v2 2/5] travis: Drop old compilers, add new ones
  2017-12-01 15:46 [LTP] [RFC PATCH v2 0/5] Travis enhancements Petr Vorel
  2017-12-01 15:46 ` [LTP] [RFC PATCH v2 1/5] travis: Add build script and use it in travis Petr Vorel
@ 2017-12-01 15:46 ` Petr Vorel
  2017-12-01 15:46 ` [LTP] [RFC PATCH v2 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-01 15:46 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 v2 3/5] travis: Add 32-bit cross-compile builds
  2017-12-01 15:46 [LTP] [RFC PATCH v2 0/5] Travis enhancements Petr Vorel
  2017-12-01 15:46 ` [LTP] [RFC PATCH v2 1/5] travis: Add build script and use it in travis Petr Vorel
  2017-12-01 15:46 ` [LTP] [RFC PATCH v2 2/5] travis: Drop old compilers, add new ones Petr Vorel
@ 2017-12-01 15:46 ` Petr Vorel
  2017-12-01 15:46 ` [LTP] [RFC PATCH v2 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-01 15:46 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 v2 4/5] travis: Add out-of-tree build
  2017-12-01 15:46 [LTP] [RFC PATCH v2 0/5] Travis enhancements Petr Vorel
                   ` (2 preceding siblings ...)
  2017-12-01 15:46 ` [LTP] [RFC PATCH v2 3/5] travis: Add 32-bit cross-compile builds Petr Vorel
@ 2017-12-01 15:46 ` Petr Vorel
  2017-12-01 15:46 ` [LTP] [RFC PATCH v2 5/5] travis: Install all dependencies + add build with minimal dependencies Petr Vorel
  2017-12-04 16:44 ` [LTP] [RFC PATCH v2 0/5] Travis enhancements Cyril Hrubis
  5 siblings, 0 replies; 11+ messages in thread
From: Petr Vorel @ 2017-12-01 15:46 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 v2 5/5] travis: Install all dependencies + add build with minimal dependencies
  2017-12-01 15:46 [LTP] [RFC PATCH v2 0/5] Travis enhancements Petr Vorel
                   ` (3 preceding siblings ...)
  2017-12-01 15:46 ` [LTP] [RFC PATCH v2 4/5] travis: Add out-of-tree build Petr Vorel
@ 2017-12-01 15:46 ` Petr Vorel
  2017-12-04 16:44 ` [LTP] [RFC PATCH v2 0/5] Travis enhancements Cyril Hrubis
  5 siblings, 0 replies; 11+ messages in thread
From: Petr Vorel @ 2017-12-01 15:46 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 v2 1/5] travis: Add build script and use it in travis
  2017-12-01 15:46 ` [LTP] [RFC PATCH v2 1/5] travis: Add build script and use it in travis Petr Vorel
@ 2017-12-04  9:55   ` Li Wang
  2017-12-04 11:24     ` Petr Vorel
  0 siblings, 1 reply; 11+ messages in thread
From: Li Wang @ 2017-12-04  9:55 UTC (permalink / raw)
  To: ltp

On Fri, Dec 1, 2017 at 11:46 PM, Petr Vorel <pvorel@suse.cz> wrote:
> 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    | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 112 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..9e057f73b
> --- /dev/null
> +++ b/build.sh
> @@ -0,0 +1,111 @@
> +#!/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"
> +
> +CONFIGURE_OPTS_IN_TREE="--with-open-posix-testsuite --with-realtime-testsuite --prefix=$PREFIX"

Here you set --prefix to current ltp path, why not "/opt/ltp"?

And, I get some installing errors with this configuration for build in tree.

# ./build.sh
[...]
install: ‘/root/ltp/testcases/realtime/perf/latency/disknoise.sh’ and
‘/root/ltp/testcases/realtime/perf/latency/disknoise.sh’ are the same
file
make[4]: *** [/root/ltp/testcases/realtime/perf/latency/cpunoise2000.sh] Error 1
make[4]: *** [/root/ltp/testcases/realtime/perf/latency/pthread_cond_latency]
Error 1
make[4]: *** [/root/ltp/testcases/realtime/perf/latency/disknoise.sh] Error 1
make[4]: *** [/root/ltp/testcases/realtime/perf/latency/cpunoise.sh] Error 1
make[4]: Leaving directory `/root/ltp/testcases/realtime/perf/latency'
make[3]: *** [install] Error 2
make[3]: Leaving directory `/root/ltp/testcases/realtime/perf'
make[2]: *** [install] Error 2
make[2]: Leaving directory `/root/ltp/testcases/realtime'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/root/ltp/testcases'
make: *** [testcases-install] Error 2
make: *** Waiting for unfinished jobs....
[...]


Test Environment
==============
# uname -rm
4.15.0-rc2 x86_64

# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap
--enable-shared --enable-threads=posix --enable-checking=release
--with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-linker-build-id --with-linker-hash-style=gnu
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto
--enable-plugin --enable-initfini-array --disable-libgcj
--with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install
--with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install
--enable-gnu-indirect-function --with-tune=generic
--with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC)


-- 
Li Wang
liwang@redhat.com

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

* [LTP] [RFC PATCH v2 1/5] travis: Add build script and use it in travis
  2017-12-04  9:55   ` Li Wang
@ 2017-12-04 11:24     ` Petr Vorel
  0 siblings, 0 replies; 11+ messages in thread
From: Petr Vorel @ 2017-12-04 11:24 UTC (permalink / raw)
  To: ltp

Hi Li,

> > +PREFIX="$HOME/ltp"
> > +
> > +CONFIGURE_OPTS_IN_TREE="--with-open-posix-testsuite --with-realtime-testsuite --prefix=$PREFIX"

> Here you set --prefix to current ltp path, why not "/opt/ltp"?
Permissions (using containers => no sudo). We could have sudo, but it would be without
containers (=slow).
See
https://docs.travis-ci.com/user/reference/overview/

> And, I get some installing errors with this configuration for build in tree.

> # ./build.sh
> [...]
> install: ‘/root/ltp/testcases/realtime/perf/latency/disknoise.sh’ and
> ‘/root/ltp/testcases/realtime/perf/latency/disknoise.sh’ are the same
> file
> make[4]: *** [/root/ltp/testcases/realtime/perf/latency/cpunoise2000.sh] Error 1
> make[4]: *** [/root/ltp/testcases/realtime/perf/latency/pthread_cond_latency]
> Error 1
> make[4]: *** [/root/ltp/testcases/realtime/perf/latency/disknoise.sh] Error 1
> make[4]: *** [/root/ltp/testcases/realtime/perf/latency/cpunoise.sh] Error 1
> make[4]: Leaving directory `/root/ltp/testcases/realtime/perf/latency'
> make[3]: *** [install] Error 2
> make[3]: Leaving directory `/root/ltp/testcases/realtime/perf'
> make[2]: *** [install] Error 2
> make[2]: Leaving directory `/root/ltp/testcases/realtime'
> make[1]: *** [install] Error 2
> make[1]: Leaving directory `/root/ltp/testcases'
> make: *** [testcases-install] Error 2
> make: *** Waiting for unfinished jobs....
> [...]
Github clones into different directory:
git clone --depth=50 --branch=master https://github.com/linux-test-project/ltp.git linux-test-project/ltp
OK, you're building in the same directory as the prefix is set. I'll fix it so we can use
it for local builds as well.
BTW: I was thinking before using /tmp, but as whole directory has ~600MB, I'll use
different name under $HOME).

Thanks for reporting it!


Kind regards,
Petr

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

* [LTP] [RFC PATCH v2 0/5] Travis enhancements
  2017-12-01 15:46 [LTP] [RFC PATCH v2 0/5] Travis enhancements Petr Vorel
                   ` (4 preceding siblings ...)
  2017-12-01 15:46 ` [LTP] [RFC PATCH v2 5/5] travis: Install all dependencies + add build with minimal dependencies Petr Vorel
@ 2017-12-04 16:44 ` Cyril Hrubis
  2017-12-05 18:58   ` Petr Vorel
  5 siblings, 1 reply; 11+ messages in thread
From: Cyril Hrubis @ 2017-12-04 16:44 UTC (permalink / raw)
  To: ltp

Hi!
> It seems to be rule running only 5 containers at a time, so 11th build slowes
> building about 4 min (18 min vs. 22 min). Which build would you remove?

Well we do the build without any additional libs with gcc-7, we may as
well switch it to clang-3.9 and drop the build with clang-3.9 with the
additional libraries, that way we wouldn't lost much coverage.

-- 
Cyril Hrubis
chrubis@suse.cz

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

* [LTP] [RFC PATCH v2 0/5] Travis enhancements
  2017-12-04 16:44 ` [LTP] [RFC PATCH v2 0/5] Travis enhancements Cyril Hrubis
@ 2017-12-05 18:58   ` Petr Vorel
  2017-12-06 10:27     ` Cyril Hrubis
  0 siblings, 1 reply; 11+ messages in thread
From: Petr Vorel @ 2017-12-05 18:58 UTC (permalink / raw)
  To: ltp

Hi Cyril,

> > It seems to be rule running only 5 containers at a time, so 11th build slowes
> > building about 4 min (18 min vs. 22 min). Which build would you remove?

> Well we do the build without any additional libs with gcc-7, we may as
> well switch it to clang-3.9 and drop the build with clang-3.9 with the
> additional libraries, that way we wouldn't lost much coverage.
gcc-7 is used for out-of-tree (gcc-6 was used in v3 for build with minimal dependencies)
OK clang-3.9 is now used only for build with minimal dependencies and it's the only build
of this type.
https://travis-ci.org/pevik-travis/ltp/builds/312014219

BTW: I'm planning to add also arm32 cross-compile build in near future. To keep only 10
jobs, I'll replace gcc-6 normal with all dependencies by it.


Kind regards,
Petr

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

* [LTP] [RFC PATCH v2 0/5] Travis enhancements
  2017-12-05 18:58   ` Petr Vorel
@ 2017-12-06 10:27     ` Cyril Hrubis
  0 siblings, 0 replies; 11+ messages in thread
From: Cyril Hrubis @ 2017-12-06 10:27 UTC (permalink / raw)
  To: ltp

Hi!
> BTW: I'm planning to add also arm32 cross-compile build in near
> future. To keep only 10 jobs, I'll replace gcc-6 normal with all
> dependencies by it.

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:27 UTC | newest]

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.