Skip to content
Snippets Groups Projects
Commit 33bc0c06 authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

:pencil: add new argument, database name, to do_tests script

parent 9b62a29f
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,16 @@
It need to be run on a machine with all the odoo requirements installed, either system-wide or in a virtual environment (which need to be activated).
A postgresql server is also needed.
It takes two optional arguments, the host of the postgresql server, and the user for this base (which need database creation rights). If a user is provided, you will need to have a .pgpass with the password if it is not the one in ``conf/dev/odoo.conf``.
It takes three optional arguments (those are positional arguments):
- the host of the postgresql server,
- the user for this base (which need database creation rights). If a user is provided, you will need to have a .pgpass with the password if it is not the one in ``conf/dev/odoo.conf``.
- the name of the database to use
Those environment variables are used:
ODOO_NO_DROP
set to reuse an existing database.
The script call `run_tests`_.
......
......@@ -17,7 +17,6 @@
here=$(dirname $0)
project_home=$(cd $here && cd .. && echo $PWD)
dbname=$(basename $project_home)_test
if ! type python3 > /dev/null; then
python="python2"
else
......@@ -67,6 +66,13 @@
ODOO_USER=--db_user=$1
dbowner=$1
shift
if [[ $# -gt 0 ]];
then
dbname=$1
shift
else
dbname=$(basename $project_home)_test
fi
else
PG_USER=""
ODOO_USER=""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment