diff --git a/files/portmaster.8 b/files/portmaster.8 index b4217690..b7ace7d5 100644 --- a/files/portmaster.8 +++ b/files/portmaster.8 @@ -32,7 +32,7 @@ .Nd manage your ports without external databases or languages .Sh SYNOPSIS Common Flags: -.Op Fl -force-config CGHKgntvw [B|b] [f|i] [D|d] +.Op Fl -force-config CGHKTgntvw [B|b] [f|i] [D|d] .Op Sy [[--packages|-P]|[--packages-only|-PP]] | [--packages-build] .Op Fl -packages-if-newer .Op Fl -delete-build-only @@ -349,6 +349,8 @@ When applied to the option it allows a distfile to be kept if it matches any up to date port, not just the ones that are installed. +.It Fl T +perform 'make test' after build package .It Fl v verbose output .It Fl w diff --git a/files/portmaster.rc.sample b/files/portmaster.rc.sample index c0df567c..484ece0c 100644 --- a/files/portmaster.rc.sample +++ b/files/portmaster.rc.sample @@ -44,6 +44,9 @@ # # RECURSE_THOROUGH=topt # +# Perform 'make test' after built package (-T) +# NEED_TEST=Topt +# # Be verbose (-v) # PM_VERBOSE=vopt # diff --git a/portmaster b/portmaster index 5471211b..0296122d 100755 --- a/portmaster +++ b/portmaster @@ -414,7 +414,7 @@ usage () { version echo '' echo 'Usage:' - echo "Common flags: [--force-config -CGHKgntvw -[B|b] -[f|i] -[D|d]]" + echo "Common flags: [--force-config -CGHKTgntvw -[B|b] -[f|i] -[D|d]]" echo " [[[--packages|-P]|[--packages-only|-PP]] | [--packages-build]]" echo " [--packages-if-newer] [--delete-build-only] [--always-fetch]" echo " [--local-packagedir=] [--packages-local] [--delete-packages]" @@ -472,6 +472,7 @@ usage () { echo '-w save old shared libraries before deinstall' echo '[-R] -f always rebuild ports (overrides -i)' echo '-i interactive update mode -- ask whether to rebuild ports' + echo '-T testing of built package' echo '-D no cleaning of distfiles' echo '-d always clean distfiles' echo "-m " @@ -720,7 +721,7 @@ set -- $newopts unset var newopts # Save switches for potential child processes -while getopts 'BCDFGHKLPRabde:fghilm:nop:r:stvwx:y' COMMAND_LINE_ARGUMENT ; do +while getopts 'BCDFGHKLPRTabde:fghilm:nop:r:stvwx:y' COMMAND_LINE_ARGUMENT ; do case "${COMMAND_LINE_ARGUMENT}" in B) NO_BACKUP=Bopt; ARGS="-B $ARGS" ;; C) DONT_PRE_CLEAN=Copt; ARGS="-C $ARGS" ;; @@ -733,6 +734,7 @@ while getopts 'BCDFGHKLPRabde:fghilm:nop:r:stvwx:y' COMMAND_LINE_ARGUMENT ; do L) LIST_PLUS=Lopt ;; P) packages_init first ;; R) RESTART=Ropt ; ARGS="-R $ARGS" ;; + T) NEED_TEST=Topt ; ARGS="-T $ARGS" ;; a) UPDATE_ALL=aopt ;; b) BACKUP=bopt; ARGS="-b $ARGS" ;; d) ALWAYS_SCRUB_DISTFILES=dopt; ARGS="-d $ARGS" ;; @@ -3995,6 +3997,10 @@ if [ -z "$use_package" ]; then [ -n "$PM_NO_MAKE_CONFIG" ] && PM_MAKE_ARGS="$PM_MAKE_ARGS -D_OPTIONS_OK" eval pm_make build $port_log_args || fail "make build failed for $portdir" + + if [ -n "$NEED_TEST" ]; then + eval pm_make test $port_log_args || fail "make test failed for $portdir" + fi pm_sv Running make stage # Defining NO_DEPENDS ensures that we will control the installation