From d0ae6e21f64e5f5e722a615c7bbf3f484db8d6c1 Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Tue, 23 Sep 2003 11:14:12 +0000 Subject: [PATCH] Alejandro Mery : this is a not-tested proposal for make check when asked and supported. (no-cross only) plus some non-tested name changes ans additions by Rene Rebe git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@1486 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- Documentation/Developers/CHANGELOG-RENE | 1 + scripts/config.hlp | 9 +++++---- scripts/config.in | 4 ++++ scripts/functions | 13 +++++++++++++ scripts/parse-config | 2 ++ 5 files changed, 25 insertions(+), 4 deletions(-) diff --git a/Documentation/Developers/CHANGELOG-RENE b/Documentation/Developers/CHANGELOG-RENE index 3292a79cd..341d13e39 100644 --- a/Documentation/Developers/CHANGELOG-RENE +++ b/Documentation/Developers/CHANGELOG-RENE @@ -6,6 +6,7 @@ - Stefan Paletta: updated python (2.3) and other stefanp repository updates openhbci/gnucash updates and fixes - Jan Veninga: sparc kernel-disable.list + - Alejandro Mery / Rene Rebe: added make check/test regression test option *) 2003-09-21 (2.0.0-rc1 - 2.0.0-rc2) diff --git a/scripts/config.hlp b/scripts/config.hlp index 9cf3352f5..a16d60461 100644 --- a/scripts/config.hlp +++ b/scripts/config.hlp @@ -20,10 +20,6 @@ # # --- ROCK-COPYRIGHT-NOTE-END --- -# Here are the help text's for ROCKLinux build configuration. -# TODO: write more about help comments ... what to write and how much -# (please much ;-) ). - COMMENT_ARCHCPUOPT In this section you are able to select the architecture, the CPU and whether you are cross-building/porting to another architecture. @@ -239,6 +235,11 @@ ROCKCFG_DO_REBUILD_STAGE In former times this was recommended - but nowadays this is only a paranoia thing. +ROCKCFG_DO_CHECK + This options enables to run a make check / test target for packages + with support for this. This can be used as extended quality assurance + to make sure the resulting binaries work correct. + ROCKCFG_OPT If this option is enabled binaries and libraries are optimised and debugging information are not build into those binaries and diff --git a/scripts/config.in b/scripts/config.in index 7bc1dc48c..5da311ebe 100644 --- a/scripts/config.in +++ b/scripts/config.in @@ -338,6 +338,10 @@ break packages!' bool 'Build and use a (pseudo-)cross compiler' ROCKCFG_USE_CROSSCC 1 bool 'Make rebuild stage (stage 9)' ROCKCFG_DO_REBUILD_STAGE 1 + if [ $ROCKCFG_CROSSBUILD != 1 ]; then + bool 'Run a check/test for packages with support' ROCKCFG_DO_CHECK 0 + fi + if [ $ROCKCFG_USE_CROSSCC != 1 ]; then pkgfilter sed 's,^\([XO] \)0,\1-,' fi diff --git a/scripts/functions b/scripts/functions index 573d54b4f..de34a659e 100644 --- a/scripts/functions +++ b/scripts/functions @@ -256,6 +256,19 @@ function eval_config_command() { eval "$config_command" } +# run 'make check' if Makefile supports it. +# +function run_check() { + if grep -q -e "^check:" ./Makefile; then + echo "Running make check ..." + $MAKE check + fi + if grep -q -e "^test:" ./Makefile; then + echo "Running make test ..." + $MAKE test + fi +} + # Parse the *.desc file. Use the description from PKG-DESC-FORMAT and # save the tag data in $desc_*. # diff --git a/scripts/parse-config b/scripts/parse-config index aec8c3298..2613671da 100644 --- a/scripts/parse-config +++ b/scripts/parse-config @@ -60,6 +60,8 @@ if [ -f "architecture/$arch/archtest.out" ] if [ -f "architecture/$arch/archtest.sh" ] then . "architecture/$arch/archtest.sh" ; fi +[ "$ROCKCFG_DO_CHECK" = 1 ] && hook_add inmake 6 'run_check' + base=$(pwd -P) if [ -f "/R_chroot.sh" ]