diff options
author | Mark Spruiell <mes@zeroc.com> | 2003-08-05 22:22:01 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2003-08-05 22:22:01 +0000 |
commit | 221c52e161f0cb91df1711052dfa4400d0f54273 (patch) | |
tree | 98d457c7c4fa446a7879615366dc4f2d6f44731c /php/allTests.py | |
parent | initial check-in (diff) | |
download | ice-221c52e161f0cb91df1711052dfa4400d0f54273.tar.bz2 ice-221c52e161f0cb91df1711052dfa4400d0f54273.tar.xz ice-221c52e161f0cb91df1711052dfa4400d0f54273.zip |
adding test scripts
Diffstat (limited to 'php/allTests.py')
-rwxr-xr-x | php/allTests.py | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/php/allTests.py b/php/allTests.py new file mode 100755 index 00000000000..bc0e845aafa --- /dev/null +++ b/php/allTests.py @@ -0,0 +1,69 @@ +#!/usr/bin/env python +# ********************************************************************** +# +# Copyright (c) 2003 +# ZeroC, Inc. +# Billerica, MA, USA +# +# All Rights Reserved. +# +# Ice is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License version 2 as published by +# the Free Software Foundation. +# +# ********************************************************************** + +import os, sys + +for toplevel in [".", "..", "../..", "../../..", "../../../.."]: + toplevel = os.path.normpath(toplevel) + if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): + break +else: + raise "can't find toplevel directory!" + +sys.path.append(os.path.join(toplevel, "config")) +import TestUtil + +# +# List of all basic tests. +# +tests = [ \ + "Ice/operations", \ + "Ice/exceptions", \ + "Ice/inheritance", \ + "Ice/facets", \ + "Ice/objects", \ + "Ice/slicing/exceptions", \ + "Ice/slicing/objects", \ + ] + +# +# The user can supply a subset of tests on the command line. +# +if sys.argv[1:]: + print "limiting tests" + newtests = [] + for i in tests: + if i in sys.argv[1:]: + newtests.append(i) + tests = newtests + +# +# Run each of the tests. +# +for i in tests: + + i = os.path.normpath(i) + dir = os.path.join(toplevel, "test", i) + + print + print "*** running tests in " + dir + ":" + print + + try: + execfile(os.path.join(dir, "run.py")) + except SystemExit, (status,): + if status: + print "test failed with exit status", status + sys.exit(status) |