mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 10:33:33 +00:00
Make the block regression tests easier to run on Linux. They no longer require setting any environment variables. r=pollmann Not part of build.
This commit is contained in:
parent
76da654012
commit
c2ca7000e2
@ -1,6 +1,40 @@
|
||||
#!/bin/sh
|
||||
|
||||
dirs="base bugs"
|
||||
nodots() {
|
||||
NODOTS_OUT=$1
|
||||
while echo "$NODOTS_OUT" | grep '/\./' > /dev/null
|
||||
do
|
||||
NODOTS_OUT=`echo $NODOTS_OUT | sed -e"s,/\./,/,"`
|
||||
done
|
||||
while echo "$NODOTS_OUT" | grep -e '/[^/]*/\.\.' > /dev/null
|
||||
do
|
||||
NODOTS_OUT=`echo $NODOTS_OUT | sed -e"s,/[^/]*/\.\.,,"`
|
||||
done
|
||||
|
||||
echo $NODOTS_OUT
|
||||
}
|
||||
|
||||
dirs="base bugs dom images net/HTML_Chars net/W3C net/baron net/boxAcidTest net/glazman net/mozilla ../table/core ../table/viewer_tests ../table/bugs ../table/marvin ../table/other ../table/dom"
|
||||
|
||||
DEPTH="../../../../.."
|
||||
TEST_BASE=`dirname $0`
|
||||
TEST_BASE=`cd $TEST_BASE;pwd`
|
||||
MOZ_TEST_BASE=$TEST_BASE/$DEPTH
|
||||
MOZCONF=$HOME/.mozconfig
|
||||
|
||||
if test -f $MOZCONF; then
|
||||
MOZ_OBJ=`grep -e "^mk_add_options MOZ_OBJDIR=" $MOZCONF | cut -d = -f 2`
|
||||
MOZ_OBJ=`echo $MOZ_OBJ | sed -e"s,@TOPSRCDIR@,$MOZ_TEST_BASE/mozilla,"`
|
||||
else
|
||||
MOZ_OBJ=$MOZ_TEST_BASE/mozilla
|
||||
fi
|
||||
|
||||
MOZ_TEST_VIEWER="${MOZ_OBJ}dist/bin/mozilla-viewer.sh -- -d 500"
|
||||
# These are needed by runtests.sh
|
||||
MOZ_TEST_VIEWER=`nodots $MOZ_TEST_VIEWER`
|
||||
MOZ_TEST_BASE=`nodots $MOZ_TEST_BASE`
|
||||
export MOZ_TEST_VIEWER
|
||||
export MOZ_TEST_BASE
|
||||
|
||||
case $1 in
|
||||
baseline|verify|clean)
|
||||
@ -12,8 +46,8 @@ case $1 in
|
||||
esac
|
||||
|
||||
for i in $dirs; do
|
||||
cd $i
|
||||
echo $cmd in $i
|
||||
../runtests.sh $1
|
||||
cd ..
|
||||
cd $TEST_BASE/$i
|
||||
echo "Running $1 in $i"
|
||||
$TEST_BASE/runtests.sh $1
|
||||
cd $TEST_BASE
|
||||
done
|
||||
|
@ -3,19 +3,22 @@
|
||||
# create test file to use first; since we don't know where the tree
|
||||
# is, and we need full pathnames in the file, we create it on the fly.
|
||||
|
||||
viewer=$MOZ_SRC/mozilla/dist/bin/viewer
|
||||
testsfile=/tmp/$$-tests.txt
|
||||
|
||||
sed -e "s@file:///s:@file:$MOZ_SRC@" < file_list.txt > $testsfile
|
||||
sed -e "s@file:///s\(:\||\)@file://$MOZ_TEST_BASE@" < file_list.txt > $testsfile
|
||||
|
||||
if test "$1"x = "baselinex"; then
|
||||
rm -r -f baseline
|
||||
mkdir baseline
|
||||
$viewer -o baseline/ -f $testsfile
|
||||
echo
|
||||
echo $MOZ_TEST_VIEWER -o baseline/ -f $testsfile
|
||||
$MOZ_TEST_VIEWER -o baseline/ -f $testsfile
|
||||
elif test "$1"x = "verifyx"; then
|
||||
rm -r -f verify
|
||||
mkdir verify
|
||||
$viewer -o verify/ -rd baseline/ -f $testsfile
|
||||
echo
|
||||
echo $MOZ_TEST_VIEWER -o baseline/ -f $testsfile
|
||||
$MOZ_TEST_VIEWER -o verify/ -rd baseline/ -f $testsfile
|
||||
elif test "$1"x = "cleanx"; then
|
||||
rm -r -f verify baseline
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user