Emmanuel Okyere wrote:
Hello all:
My name is Emmanuel, and I am currently doing some work on a Javascript
client for rabbitmq. Currently, as part of the rabbit automated tests,
the qpid python client tests are run against the rabbit server.
I noticed that:
1. after specifying the spec file to run against the server, the tests
automatically include those in the python/tests folder (although you can
use the ignore file to configure what tests are run)
2. the "../specs" folder is assumed (our specs folder resides in
../../docs/specs, from where we run our tests, so this causes an error)
I have made local changes that:
a. allows the 'specs' folder to be passed by a command option
-F/--spec-folder (defaults to ../specs)
b. gives the option to run the 'default' tests in the 'tests' folder,
with command option -D/--default-tests; if -F above is passed, -D is assumed
c. if -F and/or -D is/are not passed, then it runs only the tests
specified by the passed spec file
Please find these attached as a patch if these changes are useful.
Thanks for the patch, I have applied it to the trunk. I modified the
options slightly to make the "tests" code always run by default:
./run-tests -h
run-tests [options] [test*]
The name of a test is package.module.ClassName.testMethod
Options:
-?/-h/--help : this message
-s/--spec <spec.xml> : URL of AMQP XML specification or one of these
abbreviations:
0-8 - use the default 0-8 specification.
0-9 - use the default 0-9 specification.
-e/--errata <errata.xml> : file containing amqp XML errata
-b/--broker [<user>[/<password>[EMAIL PROTECTED]<host>[:<port>] : broker to
connect to
-v/--verbose : verbose - lists tests as they are run.
-d/--debug : enable debug logging.
-i/--ignore <test> : ignore the named test.
-I/--ignore-file : file containing patterns to ignore.
-S/--skip-self-test : skips the client self tests in the 'tests
folder'
-F/--spec-folder : folder that contains the specs to be loaded
I did this because the code under the tests dir checks that the python
client itself is functioning as expected (and never interacts with the
broker), it is therefore useful to run these by default regardless of
which set of broker tests are being run (tests_0-8, tests_0-9, or
tests_0-10) as a failure in the self-test suite would indicate that
failures in the broker suites are not necessarily the fault of the
broker being tested, and could be due to a problem in the python client
code.
--Rafael