mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-23 22:33:28 +00:00
simplification/consistency update
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@32242 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e2e3dcc696
commit
c6ab8dbb82
3 changed files with 87 additions and 81 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2011-01-20 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* TestFramework/gnustep-tests:
|
||||
* TestFramework/README:
|
||||
Simplify ... permit only one test file as an argument, so that we can
|
||||
infer a single test directory easily (the directory containing the
|
||||
file) and thus use the standard code path in which we execute Start.sh
|
||||
and End.sh and run GNUmakefile.tests in the directory containing the
|
||||
file ... ie so that behavior when executing a single test file is
|
||||
identical to behavior when that file is executed as part of a whole
|
||||
testsuite.
|
||||
|
||||
2011-01-19 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* TestFramework/gnustep-tests:
|
||||
|
|
|
@ -34,7 +34,7 @@ Running Tests
|
|||
-------------
|
||||
|
||||
To run a testsuite, use the gnustep-tests script along with the name of
|
||||
the project testsuite (directory) you with to test:
|
||||
the project testsuite (directory) you wish to test:
|
||||
|
||||
gnustep-tests base
|
||||
|
||||
|
@ -42,11 +42,11 @@ or where a group of tests within a project is to be run:
|
|||
|
||||
gnustep-tests base/NSArray
|
||||
|
||||
You may run individual test files by using the gnustep-tests script with the
|
||||
name(s) of the Objective-C test source file(s):
|
||||
You may run an individual test file by using the gnustep-tests script with the
|
||||
name of the Objective-C test source file:
|
||||
|
||||
gnustep-tests mytest.m
|
||||
gnustep-tests base/NSDate/general.m
|
||||
gnustep-tests ./mytest.m base/NSDate/general.m
|
||||
|
||||
Alternatively, you may run tests from within a project/directory. eg.
|
||||
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
# General Public License for more details.
|
||||
#
|
||||
#
|
||||
# Usage: gnustep-tests [directory | test1.m [test2.m ...]]
|
||||
# Usage: gnustep-tests [directory | test.m]
|
||||
#
|
||||
# Runs the tests in the specified directory (or those in the individual files)
|
||||
# Runs the tests in the specified directory (or those in the individual file)
|
||||
# or all the tests in subdirectories of the current directory if no arguments
|
||||
# are given.
|
||||
# A summary is written to tests.sum, a log to tests.log, and a brief
|
||||
|
@ -68,7 +68,7 @@ do
|
|||
--help | -h)
|
||||
echo
|
||||
echo "$0: Script to run the GNUstep testsuite"
|
||||
echo "Usage: gnustep-tests [directory | test1.m [test2.m ...]]"
|
||||
echo "Usage: gnustep-tests [directory | test.m]]"
|
||||
echo "Runs the specified tests, or any in subdirectories of the"
|
||||
echo "current directory if no arguments are given."
|
||||
echo "Use 'gnustep-tests --documentation' for full details."
|
||||
|
@ -124,6 +124,7 @@ then
|
|||
fi
|
||||
|
||||
TEMP=`echo *`
|
||||
TESTS=
|
||||
TESTDIRS=
|
||||
for file in $TEMP
|
||||
do
|
||||
|
@ -140,8 +141,8 @@ then
|
|||
# Only find in the directories specified.
|
||||
TESTDIRS=$*
|
||||
else
|
||||
TESTDIRS=
|
||||
TESTS=$*
|
||||
TESTDIRS=`dirname $1`
|
||||
TESTS=$1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -222,102 +223,95 @@ then
|
|||
fi
|
||||
|
||||
SUMD=.
|
||||
if test x"$TESTDIRS" = x
|
||||
then
|
||||
# Run specific individual test files.
|
||||
for TESTFILE in $TESTS
|
||||
for TESTDIR in $TESTDIRS
|
||||
do
|
||||
found=no
|
||||
# Get the names of all subdirectories containing source files.
|
||||
SRCDIRS=`find $TESTDIR -name \*.m | sed -e 's;/[^/]*$;;' | sort -u | sed -e 's/\(^\| \)X[^ ]*//g'`
|
||||
if test x"$SRCDIRS" = x
|
||||
then
|
||||
continue
|
||||
fi
|
||||
SUMD=$TESTDIR
|
||||
for dir in $SRCDIRS
|
||||
do
|
||||
run_test_file
|
||||
if test "$RUNEXIT" != "0"
|
||||
then
|
||||
break
|
||||
fi
|
||||
done
|
||||
else
|
||||
for TESTDIR in $TESTDIRS
|
||||
do
|
||||
found=no
|
||||
# Get the names of all subdirectories containing source files.
|
||||
SRCDIRS=`find $TESTDIR -name \*.m | sed -e 's;/[^/]*$;;' | sort -u | sed -e 's/\(^\| \)X[^ ]*//g'`
|
||||
if test x"$SRCDIRS" = x
|
||||
if test -f $dir/IGNORE
|
||||
then
|
||||
continue
|
||||
fi
|
||||
SUMD=$TESTDIR
|
||||
for dir in $SRCDIRS
|
||||
do
|
||||
if test -f $dir/IGNORE
|
||||
then
|
||||
continue
|
||||
fi
|
||||
found=yes
|
||||
cd $dir
|
||||
found=yes
|
||||
cd $dir
|
||||
|
||||
if test "$GSTESTMODE" = "clean"
|
||||
then
|
||||
echo "--- Cleaning tests in $dir ---"
|
||||
rm -rf core obj GNUmakefile.tmp
|
||||
rm -f tests.tmp tests.sum.tmp tests.log.tmp
|
||||
rm -f tests.log tests.sum
|
||||
rm -f oldtests.log oldtests.sum
|
||||
else
|
||||
echo "--- Running tests in $dir ---"
|
||||
if test -r ./Start.sh -a -x ./Start.sh
|
||||
then
|
||||
./Start.sh
|
||||
fi
|
||||
fi
|
||||
|
||||
if test x"$TESTS" = x
|
||||
then
|
||||
TESTS=`echo *.m | sort | sed -e 's/\(^\| \)X[^ ]*//g'`
|
||||
fi
|
||||
# If there is a GNUmakefile.tests in the directory, run it first.
|
||||
if test -f GNUmakefile.tests
|
||||
then
|
||||
if test "$GSTESTMODE" = "clean"
|
||||
then
|
||||
echo "--- Cleaning tests in $dir ---"
|
||||
rm -rf core obj GNUmakefile.tmp tests.tmp tests.sum.tmp
|
||||
rm -f tests.log tests.sum
|
||||
rm -f oldtests.log oldtests.sum
|
||||
$MAKE_CMD -f GNUmakefile.tests $MAKEFLAGS clean 2>&1
|
||||
else
|
||||
echo "--- Running tests in $dir ---"
|
||||
if test -r ./Start.sh -a -x ./Start.sh
|
||||
then
|
||||
./Start.sh
|
||||
fi
|
||||
$MAKE_CMD -f GNUmakefile.tests $MAKEFLAGS debug=yes 2>&1
|
||||
fi
|
||||
fi
|
||||
|
||||
TESTS=`echo *.m | sort | sed -e 's/\(^\| \)X[^ ]*//g'`
|
||||
# If there is a GNUmakefile.tests in the directory, run it first.
|
||||
if test -f GNUmakefile.tests
|
||||
then
|
||||
if test "$GSTESTMODE" = "clean"
|
||||
then
|
||||
$MAKE_CMD -f GNUmakefile.tests $MAKEFLAGS clean 2>&1
|
||||
else
|
||||
$MAKE_CMD -f GNUmakefile.tests $MAKEFLAGS debug=yes 2>&1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Now we process each test file in turn.
|
||||
for TESTFILE in $TESTS
|
||||
do
|
||||
run_test_file
|
||||
if test "$RUNEXIT" != "0"
|
||||
then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if test "$GSTESTMODE" != "clean"
|
||||
then
|
||||
# And perform the cleanup script.
|
||||
if test -r End.sh -a -x End.sh
|
||||
then
|
||||
End.sh
|
||||
fi
|
||||
fi
|
||||
|
||||
cd $GSTESTDIR
|
||||
# Now we process each test file in turn.
|
||||
for TESTFILE in $TESTS
|
||||
do
|
||||
run_test_file
|
||||
if test "$RUNEXIT" != "0"
|
||||
then
|
||||
break
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test $found = no
|
||||
TESTS=
|
||||
|
||||
if test "$GSTESTMODE" != "clean"
|
||||
then
|
||||
echo "No tests found in $TESTDIR"
|
||||
# And perform the cleanup script.
|
||||
if test -r ./End.sh -a -x ./End.sh
|
||||
then
|
||||
./End.sh
|
||||
fi
|
||||
fi
|
||||
|
||||
cd $GSTESTDIR
|
||||
if test "$RUNEXIT" != "0"
|
||||
then
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if test $found = no
|
||||
then
|
||||
echo "No tests found in $TESTDIR"
|
||||
fi
|
||||
if test "$RUNEXIT" != "0"
|
||||
then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if test "$GSTESTMODE" = "clean"
|
||||
then
|
||||
rm -rf core obj GNUmakefile.tmp tests.tmp tests.sum.tmp
|
||||
rm -rf core obj GNUmakefile.tmp
|
||||
rm -f tests.tmp tests.sum.tmp tests.log.tmp
|
||||
rm -f tests.log tests.sum
|
||||
rm -f oldtests.log oldtests.sum
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue