[LTP] [RFC PATCH v3 1/5] travis: Add build script and use it in travis

Cyril Hrubis chrubis@suse.cz
Mon Dec 4 18:15:11 CET 2017


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


More information about the ltp mailing list