This question has been flagged
1 Reply
4833 Views

I am trying to run all OpenERP tests and so far, I have come up with this command line arguments:

python server/7.0/openerp-server -c conf/70.conf -d Test --without-demo --test-enable --test-commit --init=all

but it doesn't seem to install all the modules.

What are the arguments used to launch OpenERP and get this result: http://runbot.openerp.com/openerp-dev-7-0-6515/logs/test-all.txt

Avatar
Discard

Related question: How to run tests.

Best Answer

First, about your command:

--without-demo and --test-enable are exclusive: the tests need the demo data. --init all doesn't exist. On the runbot, all the modules are provided (within a single comma-separated string). This is not the command used on the runbot, but you can use somthing similar to

find openerp/addons -name '__openerp__.py' -printf "%h\n" | xargs -I file basename file | sort | xargs | tr ' ' ','

to get all the addons (assuming they live inside openerp/addons). Actually sorting the module names is not necessary.

--test-commit is not needed. I never tried but it could even mean some test would no longer pass.

Now, about the command used by the runbot.

The runbot uses this small script.

Actually, here is the command used for the particular build you're referring to:

runbot-job-7 --db-prefix 7-0-6515 --log-prefix ./static/openerp-dev-7-0-6515/logs --server-path ./static/openerp-dev-7-0-6515/server --addons-path ./static/openerp-dev-7-0-6515/server/openerp/addons --web-path ./static/openerp-dev-7-0-6515/server/openerp --test-port 9235

That script itself uses the oe command. Please note that the oe command lived previously in the openerp-command project, but is now part of the openobject-server project.

The full source code of the runbot is available in the openerp-tools project.

Some documentation for the oe command is available.

Some documentation about the (new, i.e. not YAML) integrated testing infrastructure is available.

Avatar
Discard
Author

Thanks for the answer.

I think the help (openerp-server --help) need an update: -i INIT, --init=INIT install one or more modules (comma-separated list, use "all" for all modules), requires -d