Improve Sisyphus error handling, bug 415911, not part of the build

This commit is contained in:
bclary@bclary.com 2008-02-06 12:00:53 -08:00
Родитель b592bf2f32
Коммит 712708f411
16 изменённых файлов: 142 добавлений и 112 удалений

Просмотреть файл

@ -50,14 +50,14 @@ case $product in
if ! make -f client.mk build 2>&1; then if ! make -f client.mk build 2>&1; then
if [[ -z "$TEST_FORCE_CLOBBER_ON_ERROR" ]]; then if [[ -z "$TEST_FORCE_CLOBBER_ON_ERROR" ]]; then
error "error during build" error "error during build" $LINENO
else else
echo "error occured during build. attempting a clobber build" echo "error occured during build. attempting a clobber build" $LINENO
if ! make -f client.mk distclean 2>&1; then if ! make -f client.mk distclean 2>&1; then
error "error during forced clobber" error "error during forced clobber" $LINENO
fi fi
if ! make -f client.mk build 2>&1; then if ! make -f client.mk build 2>&1; then
error "error during forced build" error "error during forced build" $LINENO
fi fi
fi fi
fi fi
@ -90,7 +90,7 @@ case $product in
# #
executable=`get_executable $product $branch $executablepath` executable=`get_executable $product $branch $executablepath`
if [[ -z "$executable" ]]; then if [[ -z "$executable" ]]; then
error "get_executable $product $branch $executablepath returned empty path" error "get_executable $product $branch $executablepath returned empty path" $LINENO
fi fi
@ -120,11 +120,11 @@ case $product in
fi fi
if ! make -f Makefile.ref ${JSBUILDOPT} clean 2>&1; then if ! make -f Makefile.ref ${JSBUILDOPT} clean 2>&1; then
error "during js/src clean" error "during js/src clean" $LINENO
fi fi
if ! make -f Makefile.ref ${JSBUILDOPT} 2>&1; then if ! make -f Makefile.ref ${JSBUILDOPT} 2>&1; then
error "during js/src build" error "during js/src build" $LINENO
fi fi
;; ;;
esac esac

Просмотреть файл

@ -43,8 +43,6 @@ source ${TEST_BIN}/library.sh
TEST_LOG=/dev/null TEST_LOG=/dev/null
trap 'echo -e "\n*** ERROR ***\n\b" && tail $TEST_LOG' ERR
# #
# options processing # options processing
# #

Просмотреть файл

@ -41,6 +41,8 @@ TEST_DIR=${TEST_DIR:-/work/mozilla/mozilla.com/test.mozilla.com/www}
TEST_BIN=${TEST_BIN:-$TEST_DIR/bin} TEST_BIN=${TEST_BIN:-$TEST_DIR/bin}
source ${TEST_BIN}/library.sh source ${TEST_BIN}/library.sh
TEST_STARTUP_TRIES=${TEST_STARTUP_TRIES:-3}
# #
# options processing # options processing
# #
@ -68,7 +70,7 @@ note that the environment variables should have the same names as in the
Checks if the Spider extension is installed either in the named profile Checks if the Spider extension is installed either in the named profile
or as a global extension, by attempting up to 3 times to launch the Spider. or as a global extension, by attempting up to 3 times to launch the Spider.
If Spider fails to launch, the script returns exit code 66. If Spider fails to launch, the script returns exit code 2.
EOF EOF
exit 1 exit 1
@ -101,26 +103,26 @@ if [[ -z "$product" || -z "$branch" || -z "$executablepath" || -z "$profilename"
fi fi
if [[ "$product" != "firefox" && "$product" != "thunderbird" ]]; then if [[ "$product" != "firefox" && "$product" != "thunderbird" ]]; then
error "product \"$product\" must be one of firefox or thunderbird" error "product \"$product\" must be one of firefox or thunderbird" $LINENO
fi fi
if [[ "$branch" != "1.8.0" && "$branch" != "1.8.1" && "$branch" != "1.9.0" ]]; if [[ "$branch" != "1.8.0" && "$branch" != "1.8.1" && "$branch" != "1.9.0" ]];
then then
error "branch \"$branch\" must be one of 1.8.0, 1.8.1, 1.9.0" error "branch \"$branch\" must be one of 1.8.0, 1.8.1, 1.9.0" $LINENO
fi fi
executable=`get_executable $product $branch $executablepath` executable=`get_executable $product $branch $executablepath`
if [[ -z "$executable" ]]; then if [[ -z "$executable" ]]; then
error "get_executable $product $branch $executablepath returned empty path" error "get_executable $product $branch $executablepath returned empty path" $LINENO
fi fi
if [[ ! -x "$executable" ]]; then if [[ ! -x "$executable" ]]; then
error "executable \"$executable\" is not executable" error "executable \"$executable\" is not executable" $LINENO
fi fi
if echo "$profilename" | egrep -qiv '[a-z0-9_]'; then if echo "$profilename" | egrep -qiv '[a-z0-9_]'; then
error "profile name must consist of letters, digits or _" error "profile name must consist of letters, digits or _" $LINENO
fi fi
echo # attempt to force Spider to load echo # attempt to force Spider to load
@ -132,9 +134,8 @@ while ! $TEST_BIN/timed_run.py ${TEST_STARTUP_TIMEOUT} "Start Spider: try $tries
-uri "http://${TEST_HTTP}/bin/start-spider.html" \ -uri "http://${TEST_HTTP}/bin/start-spider.html" \
-hook "http://${TEST_HTTP}/bin/userhook-checkspider.js"; do -hook "http://${TEST_HTTP}/bin/userhook-checkspider.js"; do
let tries=tries+1 let tries=tries+1
if [ "$tries" -gt 3 ]; then if [ "$tries" -gt $TEST_STARTUP_TRIES ]; then
echo "Failed to start spider. Exiting..." error "Failed to start spider. Exiting..." $LINENO
exit 66
fi fi
done done

Просмотреть файл

@ -44,7 +44,7 @@ source ${TEST_BIN}/library.sh
source ${TEST_BIN}/set-build-env.sh $@ source ${TEST_BIN}/set-build-env.sh $@
if [[ -z "$TREE" ]]; then if [[ -z "$TREE" ]]; then
error "source tree not specified!" error "source tree not specified!" $LINENO
fi fi
cd $TREE cd $TREE
@ -56,14 +56,14 @@ case $product in
-e "mozilla/$project/config/mozconfig" ) ]]; then -e "mozilla/$project/config/mozconfig" ) ]]; then
if ! eval cvs -z3 -q co $BRANCH_CO_FLAGS \ if ! eval cvs -z3 -q co $BRANCH_CO_FLAGS \
mozilla/client.mk mozilla/$project/config/mozconfig; then mozilla/client.mk mozilla/$project/config/mozconfig; then
error "during checkout of mozconfig" error "during checkout of mozconfig" $LINENO
fi fi
fi fi
cd mozilla cd mozilla
if ! make -f client.mk checkout 2>&1; then if ! make -f client.mk checkout 2>&1; then
error "during checkout of tree" error "during checkout of tree" $LINENO
fi fi
;; ;;
@ -77,15 +77,15 @@ case $product in
cd mozilla/js/src cd mozilla/js/src
if ! eval cvs -z3 -q update $BRANCH_CO_FLAGS $DATE_CO_FLAGS -d -P 2>&1; then if ! eval cvs -z3 -q update $BRANCH_CO_FLAGS $DATE_CO_FLAGS -d -P 2>&1; then
error "during checkout of js/src" error "during checkout of js/src" $LINENO
fi fi
if ! cvs -z3 -q update -d -P -A editline config 2>&1; then if ! cvs -z3 -q update -d -P -A editline config 2>&1; then
error "during checkout of js/src" error "during checkout of js/src" $LINENO
fi fi
# end for js shell # end for js shell
;; ;;
*) *)
error "unknown product $product" error "unknown product $product" $LINENO
;; ;;
esac esac

Просмотреть файл

@ -48,7 +48,7 @@ case $product in
cd $TREE/mozilla cd $TREE/mozilla
if ! make -f client.mk clean 2>&1; then if ! make -f client.mk clean 2>&1; then
error "during client.mk clean" error "during client.mk clean" $LINENO
fi fi
;; ;;
@ -56,7 +56,7 @@ case $product in
cd $TREE/mozilla/js/src cd $TREE/mozilla/js/src
if ! make -f Makefile.ref clean 2>&1; then if ! make -f Makefile.ref clean 2>&1; then
error "during SpiderMonkey clean" error "during SpiderMonkey clean" $LINENO
fi fi
;; ;;
esac esac

Просмотреть файл

@ -91,26 +91,26 @@ if [[ -z $directory ]]
fi fi
if [[ `whoami` == "root" ]]; then if [[ `whoami` == "root" ]]; then
error "can not be run as root" error "can not be run as root" $LINENO
fi fi
# get the cannonical name directory name # get the cannonical name directory name
mkdir -p "$directory" mkdir -p "$directory"
if ! pushd "$directory" > /dev/null ; then if ! pushd "$directory" > /dev/null ; then
error "$directory is not accessible" error "$directory is not accessible" $LINENO
fi fi
directory=`pwd` directory=`pwd`
popd > /dev/null popd > /dev/null
if [[ "$directory" == "/" ]]; then if [[ "$directory" == "/" ]]; then
error "directory $directory can not be root" error "directory $directory can not be root" $LINENO
fi fi
parent=`dirname "$directory"` parent=`dirname "$directory"`
grandparent=`dirname "$parent"` grandparent=`dirname "$parent"`
if [[ "$parent" != "/tmp" && ( "$parent" == "/" || "$grandparent" == "/" ) ]]; then if [[ "$parent" != "/tmp" && ( "$parent" == "/" || "$grandparent" == "/" ) ]]; then
error "directory $directory can not be a subdirectory of $parent" error "directory $directory can not be a subdirectory of $parent" $LINENO
fi fi

Просмотреть файл

@ -101,34 +101,34 @@ if [[ -z "$product" || -z "$branch" || -z "$executablepath" || \
fi fi
if [[ "$product" != "firefox" && "$product" != "thunderbird" ]]; then if [[ "$product" != "firefox" && "$product" != "thunderbird" ]]; then
error "product \"$product\" must be one of firefox or thunderbird" error "product \"$product\" must be one of firefox or thunderbird" $LINENO
fi fi
if [[ "$branch" != "1.8.0" && "$branch" != "1.8.1" && "$branch" != "1.9.0" ]]; if [[ "$branch" != "1.8.0" && "$branch" != "1.8.1" && "$branch" != "1.9.0" ]];
then then
error "branch \"$branch\" must be one of 1.8.0, 1.8.1, 1.9.0" error "branch \"$branch\" must be one of 1.8.0, 1.8.1, 1.9.0" $LINENO
fi fi
executable=`get_executable $product $branch $executablepath` executable=`get_executable $product $branch $executablepath`
if [[ -z "$executable" ]]; then if [[ -z "$executable" ]]; then
error "get_executable $product $branch $executablepath returned empty path" error "get_executable $product $branch $executablepath returned empty path" $LINENO
fi fi
if [[ ! -x "$executable" ]]; then if [[ ! -x "$executable" ]]; then
error "executable \"$executable\" is not executable" error "executable \"$executable\" is not executable" $LINENO
fi fi
$TEST_BIN/create-directory.sh -d "$directory" -n $TEST_BIN/create-directory.sh -d "$directory" -n
if echo "$profilename" | egrep -qiv '[a-z0-9_]'; then if echo "$profilename" | egrep -qiv '[a-z0-9_]'; then
error "profile name \"$profilename\" must consist of letters, digits or _" error "profile name \"$profilename\" must consist of letters, digits or _" $LINENO
fi fi
if [ $OSID == "win32" ]; then if [ $OSID == "win32" ]; then
directoryospath=`cygpath -a -w $directory` directoryospath=`cygpath -a -w $directory`
if [[ -z "$directoryospath" ]]; then if [[ -z "$directoryospath" ]]; then
error "unable to convert unix path to windows path" error "unable to convert unix path to windows path" $LINENO
fi fi
else else
directoryospath="$directory" directoryospath="$directory"
@ -137,12 +137,12 @@ fi
echo "creating profile $profilename in directory $directory" echo "creating profile $profilename in directory $directory"
if ! $TEST_BIN/timed_run.py ${TEST_STARTUP_TIMEOUT} "-" $executable -CreateProfile "$profilename $directoryospath"; then if ! $TEST_BIN/timed_run.py ${TEST_STARTUP_TIMEOUT} "-" $executable -CreateProfile "$profilename $directoryospath"; then
error "creating profile $directory" error "creating profile $directory" $LINENO
fi fi
if [[ -n $profiletemplate ]]; then if [[ -n $profiletemplate ]]; then
if [[ ! -d $profiletemplate ]]; then if [[ ! -d $profiletemplate ]]; then
error "profile template directory $profiletemplate does not exist" error "profile template directory $profiletemplate does not exist" $LINENO
fi fi
echo "copying template profile $profiletemplate to $directory" echo "copying template profile $profiletemplate to $directory"
cp -R $profiletemplate/* $directory cp -R $profiletemplate/* $directory

Просмотреть файл

@ -97,11 +97,11 @@ fi
executable=`get_executable $product $branch $executablepath` executable=`get_executable $product $branch $executablepath`
if [[ -z "$executable" ]]; then if [[ -z "$executable" ]]; then
error "get_executable $product $branch $executablepath returned empty path" error "get_executable $product $branch $executablepath returned empty path" $LINENO
fi fi
if [[ ! -x "$executable" ]]; then if [[ ! -x "$executable" ]]; then
error "executable \"$executable\" is not executable" error "executable \"$executable\" is not executable" $LINENO
fi fi
executablepath=`dirname $executable` executablepath=`dirname $executable`
@ -159,12 +159,12 @@ if [[ $talkback -eq 1 ]]; then
IFS=: IFS=:
;; ;;
*) *)
error "unknown os $OSID" error "unknown os $OSID" $LINENO
;; ;;
esac esac
if [[ -z "$talkbackdir" ]]; then if [[ -z "$talkbackdir" ]]; then
error "empty talkback directory" error "empty talkback directory" $LINENO
fi fi
mkdir -p "$talkbackdir" mkdir -p "$talkbackdir"
@ -197,6 +197,6 @@ if [[ $talkback -eq 1 ]]; then
sed -i.bak "s@URLEditControl .*@URLEditControl = \"mozqa:$talkbackid\"@" Talkback.ini sed -i.bak "s@URLEditControl .*@URLEditControl = \"mozqa:$talkbackid\"@" Talkback.ini
;; ;;
*) *)
error "unknown os=$OSID" error "unknown os=$OSID" $LINENO
esac esac
fi fi

Просмотреть файл

@ -111,7 +111,7 @@ if [[ $OSID == "win32" ]]; then
elif echo $filetype | grep -iq 'zip archive'; then elif echo $filetype | grep -iq 'zip archive'; then
unzip -o -d "$executablepath" "$filename" unzip -o -d "$executablepath" "$filename"
else else
error "$unknown file type $filetype" error "$unknown file type $filetype" $LINENO
fi fi
else else
@ -123,7 +123,7 @@ else
elif echo $filetype | grep -iq 'gzip'; then elif echo $filetype | grep -iq 'gzip'; then
tar -zxvf $filename -C "$executablepath" tar -zxvf $filename -C "$executablepath"
else else
error "unknown file type $filetype" error "unknown file type $filetype" $LINENO
fi fi
;; ;;
@ -138,7 +138,7 @@ else
echo "disk=$disk" echo "disk=$disk"
echo "volume=$volume" echo "volume=$volume"
if [[ -z "$disk" || -z "$volume" ]]; then if [[ -z "$disk" || -z "$volume" ]]; then
error "mounting disk image: $result" error "mounting disk image: $result" $LINENO
fi fi
for app in $volume/*.app; do for app in $volume/*.app; do
@ -155,7 +155,7 @@ else
# #
executable=`get_executable $product $branch $executablepath` executable=`get_executable $product $branch $executablepath`
if [[ -z "$executable" ]]; then if [[ -z "$executable" ]]; then
error "get_executable $product $branch $executablepath returned empty directory" error "get_executable $product $branch $executablepath returned empty directory" $LINENO
fi fi
executabledir=`dirname $executable` executabledir=`dirname $executable`

Просмотреть файл

@ -100,30 +100,30 @@ if [[ -z "$product" || -z "$branch" || \
fi fi
if [[ "$product" != "firefox" && "$product" != "thunderbird" ]]; then if [[ "$product" != "firefox" && "$product" != "thunderbird" ]]; then
error "product \"$product\" must be one of firefox or thunderbird" error "product \"$product\" must be one of firefox or thunderbird" $LINENO
fi fi
if [[ "$branch" != "1.8.0" && "$branch" != "1.8.1" && "$branch" != "1.9.0" ]]; if [[ "$branch" != "1.8.0" && "$branch" != "1.8.1" && "$branch" != "1.9.0" ]];
then then
error "branch \"$branch\" must be one of 1.8.0, 1.8.1, 1.9.0" error "branch \"$branch\" must be one of 1.8.0, 1.8.1, 1.9.0" $LINENO
fi fi
executable=`get_executable $product $branch $executablepath` executable=`get_executable $product $branch $executablepath`
if [[ -z "$executable" ]]; then if [[ -z "$executable" ]]; then
error "get_executable $product $branch $executablepath returned empty path" error "get_executable $product $branch $executablepath returned empty path" $LINENO
fi fi
if [[ ! -x "$executable" ]]; then if [[ ! -x "$executable" ]]; then
error "executable \"$executable\" is not executable" error "executable \"$executable\" is not executable" $LINENO
fi fi
if echo $profilename | egrep -qiv '[a-z0-9_]'; then if echo $profilename | egrep -qiv '[a-z0-9_]'; then
error "profile name must consist of letters, digits or _" error "profile name must consist of letters, digits or _" $LINENO
fi fi
for extension in $extensions/all/*; do for extension in $extensions/all/*.xpi; do
if [[ $extension == "$extensions/all/*" ]]; then if [[ $extension == "$extensions/all/*.xpi" ]]; then
break break
fi fi
if [[ "$OSID" == "win32" ]]; then if [[ "$OSID" == "win32" ]]; then
@ -150,7 +150,7 @@ for extension in $extensions/$OSID/*; do
echo installing $extension echo installing $extension
if ! $TEST_BIN/timed_run.py ${TEST_STARTUP_TIMEOUT} "-" $executable -P $profilename -install-global-extension "$extensionos"; then if ! $TEST_BIN/timed_run.py ${TEST_STARTUP_TIMEOUT} "-" $executable -P $profilename -install-global-extension "$extensionos"; then
error "Failed to install $extensionos" error "Failed to install $extensionos" $LINENO
fi fi
done done
@ -164,6 +164,6 @@ fi
if ! $TEST_BIN/timed_run.py ${TEST_STARTUP_TIMEOUT} "install extensions - second restart" \ if ! $TEST_BIN/timed_run.py ${TEST_STARTUP_TIMEOUT} "install extensions - second restart" \
$executable -P $profilename "http://${TEST_HTTP}/bin/install-extensions-2.html"; then $executable -P $profilename "http://${TEST_HTTP}/bin/install-extensions-2.html"; then
error "Fatal 2nd failure to load the install-extensions page" error "Fatal 2nd failure to load the install-extensions page" $LINENO
fi fi

Просмотреть файл

@ -95,17 +95,17 @@ if [[ -z "$product" || -z "$branch" || \
fi fi
if [[ "$product" != "firefox" && "$product" != "thunderbird" ]]; then if [[ "$product" != "firefox" && "$product" != "thunderbird" ]]; then
error "product \"$product\" must be one of firefox or thunderbird" error "product \"$product\" must be one of firefox or thunderbird" $LINENO
fi fi
executable=`get_executable $product $branch $executablepath` executable=`get_executable $product $branch $executablepath`
if [[ -z "$executable" ]]; then if [[ -z "$executable" ]]; then
error "get_executable $product $branch $executablepath returned empty path" error "get_executable $product $branch $executablepath returned empty path" $LINENO
fi fi
if [[ ! -x "$executable" ]]; then if [[ ! -x "$executable" ]]; then
error "executable \"$executable\" is not executable" error "executable \"$executable\" is not executable" $LINENO
fi fi
executablepath=`dirname $executable` executablepath=`dirname $executable`

Просмотреть файл

@ -43,23 +43,73 @@
# TEST_DIR=${TEST_DIR:-/work/mozilla/mozilla.com/test.mozilla.com/www} # TEST_DIR=${TEST_DIR:-/work/mozilla/mozilla.com/test.mozilla.com/www}
# TEST_BIN=${TEST_BIN:-$TEST_DIR/bin} # TEST_BIN=${TEST_BIN:-$TEST_DIR/bin}
# source ${TEST_BIN}/library.sh # source ${TEST_BIN}/library.sh
#
#trap "echo error $0 `caller 1`; exit" ERR
# skip remainder of script if it has already
# included
if [[ -n "$DEBUG" ]]; then if [[ -n "$DEBUG" ]]; then
echo "calling $0 $@" 1>&2 echo "calling $0 $@" 1>&2
fi fi
# export variables
set -a
# in the event of an untrapped script error tail the test log,
# if it exists, to stderr then echo a FATAL ERROR message to the
# test log and stderr.
function _err()
{
local rc=$?
debug "_err: $0"
if [[ "$rc" -gt 0 ]]; then
if [[ -n "$TEST_LOG" ]]; then
echo -e "\nFATAL ERROR in $0 exit code $rc\n" >> $TEST_LOG
else
echo -e "\nFATAL ERROR in $0 exit code $rc\n" 1>&2
fi
fi
exit $rc
}
trap "_err" ERR
function _exit()
{
local rc=$?
local currscript=`get_scriptname $0`
debug "_exit: $0"
if [[ "$rc" -gt 0 && -n "$TEST_LOG" && "$SCRIPT" == "$currscript" ]]; then
# only tail the log once at the top level script
tail $TEST_LOG 1>&2
fi
}
trap "_exit" EXIT
# error message
# output error message end exit 2
error()
{
local message=$1
local lineno=$2
debug "error: $0:$LINENO"
echo -e "FATAL ERROR in script $0:$lineno $message\n" 1>&2
if [[ "$0" == "-bash" || "$0" == "bash" ]]; then
return 0
fi
exit 2
}
if [[ -z "$LIBRARYSH" ]]; then if [[ -z "$LIBRARYSH" ]]; then
# skip remainder of script if it has already included
LIBRARYSH=1 LIBRARYSH=1
# export variables
set -a
# set time format for pipeline timing reports # set time format for pipeline timing reports
TIMEFORMAT="Elapsed time %0R seconds, User %0U seconds, System %0S seconds, CPU %P%%" TIMEFORMAT="Elapsed time %0R seconds, User %0U seconds, System %0S seconds, CPU %P%%"
@ -86,22 +136,10 @@ if [[ -z "$LIBRARYSH" ]]; then
console() console()
{ {
echo "$@" 1>&2 echo -e "$@" 1>&2
} }
# error message
# output error message end exit 2
error()
{
echo "error in script $SCRIPT: $1"
if [[ "$0" == "-bash" || "$0" == "bash" ]]; then
return 0
fi
exit 2
}
# dumpenvironment # dumpenvironment
# #
# output environment to stdout # output environment to stdout
@ -167,11 +205,18 @@ if [[ -z "$LIBRARYSH" ]]; then
fi fi
} }
if [[ "$0" == "-bash" || "$0" == "bash" ]]; then function get_scriptname()
SCRIPT="library.sh" {
else local script
SCRIPT=`basename $0` if [[ "$0" == "-bash" || "$0" == "bash" ]]; then
fi script="library.sh"
else
script=`basename $0`
fi
echo $script
}
SCRIPT=`get_scriptname $0`
TEST_DIR=${TEST_DIR:-/work/mozilla/mozilla.com/test.mozilla.com/www} TEST_DIR=${TEST_DIR:-/work/mozilla/mozilla.com/test.mozilla.com/www}
TEST_BIN=${TEST_BIN:-$TEST_DIR/bin} TEST_BIN=${TEST_BIN:-$TEST_DIR/bin}

Просмотреть файл

@ -63,7 +63,7 @@ for filepath in $@; do
if ! install-build.sh -p "$product" -b "$branch" -x "/tmp/$product-$branch" \ if ! install-build.sh -p "$product" -b "$branch" -x "/tmp/$product-$branch" \
-f "$filepath"; then -f "$filepath"; then
error "installing build $product $branch into /tmp/$product-$branch" error "installing build $product $branch into /tmp/$product-$branch" $LINENO
fi fi
if [[ "$product" == "thunderbird" ]]; then if [[ "$product" == "thunderbird" ]]; then
@ -77,20 +77,20 @@ for filepath in $@; do
-D "/tmp/$product-$branch-profile" -N "$product-$branch-profile" \ -D "/tmp/$product-$branch-profile" -N "$product-$branch-profile" \
-U ${TEST_DIR}/prefs/test-user.js \ -U ${TEST_DIR}/prefs/test-user.js \
$template; then $template; then
error "creating profile $product-$branch-profile at /tmp/$product-$branch" error "creating profile $product-$branch-profile at /tmp/$product-$branch" $LINENO
fi fi
if ! install-extensions.sh -p "$product" -b "$branch" \ if ! install-extensions.sh -p "$product" -b "$branch" \
-x "/tmp/$product-$branch" \ -x "/tmp/$product-$branch" \
-N "$product-$branch-profile" \ -N "$product-$branch-profile" \
-E ${TEST_DIR}/xpi; then -E ${TEST_DIR}/xpi; then
error "installing extensions from ${TEST_DIR}/xpi" error "installing extensions from ${TEST_DIR}/xpi" $LINENO
fi fi
if ! check-spider.sh -p "$product" -b "$branch" \ if ! check-spider.sh -p "$product" -b "$branch" \
-x "/tmp/$product-$branch" \ -x "/tmp/$product-$branch" \
-N "$product-$branch-profile"; then -N "$product-$branch-profile"; then
error "check-spider.sh failed." error "check-spider.sh failed." $LINENO
fi fi
uninstall-build.sh -p "$product" -b "$branch" -x "/tmp/$product-$branch" uninstall-build.sh -p "$product" -b "$branch" -x "/tmp/$product-$branch"

Просмотреть файл

@ -255,18 +255,10 @@ fi
if [[ -n "$extensiondir" ]]; then if [[ -n "$extensiondir" ]]; then
if ! install-extensions.sh -p $product -b $branch \ install-extensions.sh -p $product -b $branch \
-x $executablepath -N $profilename -E $extensiondir; then -x $executablepath -N $profilename -E $extensiondir
exit 2
fi
if ! check-spider.sh -p $product -b $branch \ check-spider.sh -p $product -b $branch \
-x $executablepath -N $profilename; then -x $executablepath -N $profilename
exit 2
fi
fi fi

Просмотреть файл

@ -1,4 +1,4 @@
#!/bin/bash #!/bin/bash -e
# -*- Mode: Shell-script; tab-width: 4; indent-tabs-mode: nil; -*- # -*- Mode: Shell-script; tab-width: 4; indent-tabs-mode: nil; -*-
# ***** BEGIN LICENSE BLOCK ***** # ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
@ -43,8 +43,6 @@ source ${TEST_BIN}/library.sh
TEST_LOG=/dev/null TEST_LOG=/dev/null
#trap 'echo -e "\n*** ERROR ***\n\b" && tail $TEST_LOG' ERR
# #
# options processing # options processing
# #
@ -53,7 +51,7 @@ function usage()
{ {
cat<<EOF cat<<EOF
usage: usage:
$SCRIPT -t testscript datalist1 [datalist2 [datalist3 [datalist4]]] $SCRIPT -t testscript [-v ] datalist1 [datalist2 [datalist3 [datalist4]]]
variable description variable description
=============== =========================================================== =============== ===========================================================
@ -109,14 +107,10 @@ for data in $datalist; do
echo "log: $TEST_LOG " echo "log: $TEST_LOG "
if [[ "$verbose" == "1" ]]; then if [[ "$verbose" == "1" ]]; then
if ! test-setup.sh -d $TEST_DIR/data/$data.data 2>&1 | tee -a $TEST_LOG; then test-setup.sh -d $TEST_DIR/data/$data.data 2>&1 | tee -a $TEST_LOG
error "test-setup.sh failed"
fi
$testscript $testargs -d $TEST_DIR/data/$data.data 2>&1 | tee -a $TEST_LOG $testscript $testargs -d $TEST_DIR/data/$data.data 2>&1 | tee -a $TEST_LOG
else else
if ! test-setup.sh -d $TEST_DIR/data/$data.data >> $TEST_LOG 2>&1; then test-setup.sh -d $TEST_DIR/data/$data.data >> $TEST_LOG 2>&1
error "test-setup.sh failed"
fi
$testscript $testargs -d $TEST_DIR/data/$data.data >> $TEST_LOG 2>&1 $testscript $testargs -d $TEST_DIR/data/$data.data >> $TEST_LOG 2>&1
fi fi

Просмотреть файл

@ -142,7 +142,7 @@ if [[ $OSID == "win32" ]]; then
fi fi
fi fi
else else
error "Unknown branch $branch" error "Unknown branch $branch" $LINENO
fi fi
# the NSIS uninstaller will copy itself, then fork to the new # the NSIS uninstaller will copy itself, then fork to the new
# copy so that it can delete itself. This causes a race condition # copy so that it can delete itself. This causes a race condition