deptest: Add --force to force a test
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23826 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
22441e9171
commit
e1fe0dfb0c
1 changed files with 7 additions and 1 deletions
|
@ -36,6 +36,7 @@ usage()
|
||||||
echo "OPTIONS:"
|
echo "OPTIONS:"
|
||||||
echo " --lean Run a lean test. Do not clean the build directory for each"
|
echo " --lean Run a lean test. Do not clean the build directory for each"
|
||||||
echo " package test."
|
echo " package test."
|
||||||
|
echo " --force Force a test, even if a success stamp is available"
|
||||||
echo
|
echo
|
||||||
echo "PACKAGES are packages to test. If not specified, all installed packages"
|
echo "PACKAGES are packages to test. If not specified, all installed packages"
|
||||||
echo "will be tested."
|
echo "will be tested."
|
||||||
|
@ -54,7 +55,8 @@ test_package() # $1=pkgname
|
||||||
local STAMP_FAILED="$STAMP_DIR_FAILED/$pkg"
|
local STAMP_FAILED="$STAMP_DIR_FAILED/$pkg"
|
||||||
local STAMP_BLACKLIST="$STAMP_DIR_BLACKLIST/$pkg"
|
local STAMP_BLACKLIST="$STAMP_DIR_BLACKLIST/$pkg"
|
||||||
rm -f "$STAMP_FAILED"
|
rm -f "$STAMP_FAILED"
|
||||||
[ -f "$STAMP_SUCCESS" ] && return
|
[ -f "$STAMP_SUCCESS" -a $force -eq 0 ] && return
|
||||||
|
rm -f "$STAMP_SUCCESS"
|
||||||
[ -n "$SELECTED" ] || {
|
[ -n "$SELECTED" ] || {
|
||||||
echo "Package $pkg is not selected"
|
echo "Package $pkg is not selected"
|
||||||
return
|
return
|
||||||
|
@ -87,6 +89,7 @@ test_package() # $1=pkgname
|
||||||
# parse commandline options
|
# parse commandline options
|
||||||
packages=
|
packages=
|
||||||
lean_test=0
|
lean_test=0
|
||||||
|
force=0
|
||||||
while [ $# -ne 0 ]; do
|
while [ $# -ne 0 ]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--help|-h)
|
--help|-h)
|
||||||
|
@ -96,6 +99,9 @@ while [ $# -ne 0 ]; do
|
||||||
--lean)
|
--lean)
|
||||||
lean_test=1
|
lean_test=1
|
||||||
;;
|
;;
|
||||||
|
--force)
|
||||||
|
force=1
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
packages="$packages $1"
|
packages="$packages $1"
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue