- version update to 20190529

* prepare for usage in module package checking
- modified sources
  % macros.apache-rex

OBS-URL: https://build.opensuse.org/package/show/Apache/apache-rex?expand=0&rev=40
This commit is contained in:
Petr Gajdos 2019-05-29 13:38:36 +00:00 committed by Git OBS Bridge
parent fb069a0356
commit 3244df9ec4
4 changed files with 35 additions and 22 deletions

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Wed May 29 13:37:26 UTC 2019 - pgajdos@suse.com
- version update to 20190529
* prepare for usage in module package checking
- modified sources
% macros.apache-rex
-------------------------------------------------------------------
Fri Feb 8 12:23:25 UTC 2019 - Petr Gajdos <pgajdos@suse.com>

View File

@ -25,7 +25,7 @@
%define macros_file macros.apache-rex
Name: apache-rex
Version: 20190208
Version: 20190529
Release: 0
Summary: Script for Apache HTTPD Runnable Examples
License: Apache-2.0

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ee90234b3feb2cfea9bbad887fde4b49483634ec2f03913406e7144e4de0962b
size 1372079
oid sha256:e3eb136b7265655ccbf6e8a960823ff3f6bde93cebf22712df58b1b1750aa508
size 1518254

View File

@ -2,7 +2,7 @@
%__rex_run_dir ./apache-rex
%__rex_logfile %{__rex_run_dir}/run_log
%__rex_verbosity 0
%__rex_verbosity 1
#
# macro: run supplied apache runnable example
@ -13,35 +13,40 @@
# default: see %{__rex_run_dir}
# -v verbosity verbosity of the output [0, 1, 2]
# default: see %{__rex_verbosity}
# -m module_path coma separated list; path(s) to additional modules (to be tested)
# default: ''
# -b binary_path coma separated list; path(s) to additional binaries (to be tested)
# default: ''
#
%apache_rex_check(r:) \
EXAMPLE_DIR="%1" \
if [ -z "%1" ]; then \
%apache_rex_check(r:,v:,m:,b:) \
EXAMPLE_DIRS="%{*}" \
if [ -z "$EXAMPLE_DIRS" ]; then \
echo "ERROR: no example dir provided" \
exit 1 \
fi \
if [ ! -d "$EXAMPLE_DIR" ]; then \
EXAMPLE_DIR="%{__rex_examples}%1" \
EDS= \
for EXAMPLE_DIR in $EXAMPLE_DIRS; do \
if [ ! -d "$EXAMPLE_DIR" ]; then \
echo "ERROR: example %1 not found" \
exit 1 \
EXAMPLE_DIR="%{__rex_examples}$EXAMPLE_DIR" \
if [ ! -d "$EXAMPLE_DIR" ]; then \
echo "ERROR: example $EXAMPLE_DIR not found" \
exit 1 \
fi \
fi \
fi \
REX_RUN_DIR="%{-r:%{-r*}}" \
EDS="$EDS $EXAMPLE_DIR" \
done \
EXAMPLE_DIRS="$EDS" \
REX_RUN_DIR_BASE="%{-r:%{-r*}}" \
if [ -z "$REX_RUN_DIR" ]; then \
REX_RUN_DIR='%{__rex_run_dir}' \
REX_RUN_DIR_BASE='%{__rex_run_dir}' \
fi \
mkdir -p $REX_RUN_DIR_BASE \
REX_VERBOSITY="%{-v:%{-v*}}" \
if [ -z "$REX_VERBOSITY" ]; then \
REX_VERBOSITY='%{__rex_verbosity}' \
fi \
echo "HERE $PWD, creating $REX_RUN_DIR" \
mkdir -p $REX_RUN_DIR \
ls -ld $PWD/$REX_RUN_DIR \
VERBOSITY=%{__rex_verbosity} RUN_DIR_BASE=$PWD/$REX_RUN_DIR run-rex $EXAMPLE_DIR | tee %{__rex_logfile} \
if grep -q 'FAILED RUNS:' %{__rex_logfile}; then \
echo "ERROR: example %1 failed, see %{__rex_logfile}" \
exit 1 \
fi \
REX_MODULE_PATH="%{-m:%{-m*}}" \
REX_BINARY_PATH="%{-b:%{-b*}}" \
VERBOSITY=$REX_VERBOSITY RUN_DIR_BASE=$REX_RUN_DIR_BASE MODULE_PATH=$REX_MODULE_PATH BINARY_PATH=$REX_BINARY_PATH run-rex $EXAMPLE_DIRS | tee %{__rex_logfile} \
%nil