Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMP] Allow to add server wide modules through environment variable #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions bin/oca_run_tests
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ set -ex

oca_wait_for_postgres

if [ -n "${SERVER_WIDE_MODULES}"]; then
WIDE_MODULES=${SERVER_WIDE_MODULES}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if we should enhance this to ensure web and base are in the list and concatenate them or to make that in copier

else
WIDE_MODULES="web,base"
fi
if [ -n "${INCLUDE}" ]; then
ADDONS=$(manifestoo --select-include "${INCLUDE}" --select-exclude "${EXCLUDE}" list --separator=,)
else
Expand All @@ -21,5 +26,6 @@ unbuffer coverage run --include "${ADDONS_DIR}/*" --branch \
$(which odoo || which openerp-server) \
-d ${PGDATABASE} \
-i ${ADDONS} \
--load=${WIDE_MODULES}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can simplify it by specifying a default to the env var.

Suggested change
--load=${WIDE_MODULES}
--load=${SERVER_WIDE_MODULES:-web,base}

--test-enable \
--stop-after-init