File tree Expand file tree Collapse file tree 3 files changed +24
-3
lines changed Expand file tree Collapse file tree 3 files changed +24
-3
lines changed Original file line number Diff line number Diff line change 52
52
unixodbc-dev
53
53
- name : Requirements Installation
54
54
run : |
55
+ sed -i -E "s/(gevent==)21\.8\.0( ; sys_platform != 'win32' and python_version == '3.10')/\122.10.2\2/;s/(greenlet==)1.1.2( ; sys_platform != 'win32' and python_version == '3.10')/\12.0.2\2/" odoo/requirements.txt
55
56
pip install -q -r odoo/requirements.txt
56
57
pip install -r ./requirements.txt
57
58
- name : OpenUpgrade Docs
Original file line number Diff line number Diff line change @@ -85,14 +85,15 @@ jobs:
85
85
unixodbc-dev
86
86
- name : Requirements Installation
87
87
run : |
88
+ sed -i -E "s/(gevent==)21\.8\.0( ; sys_platform != 'win32' and python_version == '3.10')/\122.10.2\2/;s/(greenlet==)1.1.2( ; sys_platform != 'win32' and python_version == '3.10')/\12.0.2\2/" odoo/requirements.txt
88
89
pip install -q -r odoo/requirements.txt
89
90
pip install -r ./openupgrade/requirements.txt
90
91
# this is for v16 l10n_eg_edi_eta which crashes without it
91
92
pip install asn1crypto
92
93
- name : Test data
93
94
run : |
94
- if test -n "$(ls openupgrade/openupgrade_scripts/scripts/*/*/ tests/data*.py 2> /dev/null)"; then
95
- for snippet in openupgrade/openupgrade_scripts/scripts/*/*/ tests/data*.py; do
95
+ if test -n "$(ls openupgrade/openupgrade_scripts/scripts/*/tests/data*.py 2> /dev/null)"; then
96
+ for snippet in openupgrade/openupgrade_scripts/scripts/*/tests/data*.py; do
96
97
odoo-old/odoo-bin shell -d $DB < $snippet
97
98
done
98
99
fi
@@ -131,14 +132,16 @@ jobs:
131
132
echo Execution of Openupgrade with the update of the following modules : $MODULES_NEW
132
133
# Silence redundant logs from unlinking records (1 line is enough)
133
134
# to prevent log overflow
134
- OPENUPGRADE_TESTS=1 $ODOO \
135
+ $ODOO \
135
136
--addons-path=`echo $ADDONS_PATHS | awk -v OFS="," '$1=$1'` \
136
137
--database=$DB \
137
138
--db_host=$DB_HOST \
138
139
--db_password=$DB_PASSWORD \
139
140
--db_port=$DB_PORT \
140
141
--db_user=$DB_USERNAME \
141
142
--load=base,web,openupgrade_framework \
143
+ --test-enable \
144
+ --test-tags openupgrade \
142
145
--log-handler odoo.models.unlink:WARNING \
143
146
--stop-after-init \
144
147
--update=$MODULES_NEW
Original file line number Diff line number Diff line change 14
14
"location of openupgrade_scripts"
15
15
)
16
16
config ["upgrade_path" ] = os .path .join (path , "scripts" )
17
+
18
+
19
+ def openupgrade_test (cls ):
20
+ """
21
+ Set attributes on a test class necessary for the test framework
22
+ Use as decorator on test classes in openupgrade_scripts/scripts/*/tests/test_*.py
23
+ """
24
+ tags = getattr (cls , "test_tags" , None ) or set ()
25
+ if "openupgrade" not in tags :
26
+ tags .add ("openupgrade" )
27
+ if not any (t .endswith ("_install" ) for t in tags ):
28
+ tags .add ("at_install" )
29
+ cls .test_tags = tags
30
+ cls .test_module = cls .__module__ .split ("." )[2 ]
31
+ cls .test_class = cls .__name__
32
+ cls .test_sequence = 0
33
+ return cls
You can’t perform that action at this time.
0 commit comments