Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new flag -T #51

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion files/portmaster.8
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions files/portmaster.rc.sample
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
#
# RECURSE_THOROUGH=topt
#
# Perform 'make test' after built package (-T)
# NEED_TEST=Topt
#
# Be verbose (-v)
# PM_VERBOSE=vopt
#
Expand Down
10 changes: 8 additions & 2 deletions portmaster
Original file line number Diff line number Diff line change
Expand Up @@ -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=<path>] [--packages-local] [--delete-packages]"
Expand Down Expand Up @@ -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 <arguments for the 'make' command line>"
Expand Down Expand Up @@ -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" ;;
Expand All @@ -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" ;;
Expand Down Expand Up @@ -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
Expand Down