Commit graph

36 commits

Author SHA1 Message Date
60d049dfec [FIX] install : compiler pykcs11 avec SWIG 4.3 et au-delà
Toute installation d'Odoo 14, 15 ou 17 échoue depuis que SWIG 4.5 est paru
sur PyPI : « ‘PyInt_FromLong’ was not declared in this scope », 55 fois.
pykcs11 — tiré par endesive — ne livre aucun wrapper pré-généré, et son
« requires = ["swig"] » n'est pas borné : c'est la DERNIÈRE version publiée
qui tourne, pas celle du système. Or SWIG 4.3 a retiré les alias Python 2
qu'il écrivait lui-même, et le typemap CK_RV de pykcs11 en utilise un.

On rend l'alias au préprocesseur, identique token pour token à celui de
SWIG 4.2. CPPFLAGS et non CFLAGS : un .cpp passe par compiler_so_cxx.
Vérifié sur la VM et ici : poetry install rend 0, import PyKCS11 passe.

--- EN ---

Every Odoo 14, 15 and 17 install has been failing since SWIG 4.5 landed on
PyPI: "'PyInt_FromLong' was not declared in this scope", 55 times. pykcs11
— pulled in by endesive — ships no pre-generated wrapper, and its
`requires = ["swig"]` is unbounded: the LATEST published version runs, not
the system one. SWIG 4.3 dropped the Python 2 aliases it used to emit
itself, and pykcs11's CK_RV typemap uses one of them.

We hand the alias back to the preprocessor, token for token identical to
SWIG 4.2's. CPPFLAGS, not CFLAGS: a .cpp goes through compiler_so_cxx.
Verified on the VM and here: poetry install returns 0, import PyKCS11 works.

Assisted-by: Claude Opus 5
2026-08-23 02:11:50 -04:00
5b748e347e [ADD] make: une cible pour les tests unitaires, dépendance mobile déclarée
Ces 382 tests ne tournaient que lancés à la main, donc jamais. « make test »
demande une base de données et plusieurs minutes ; ceux-ci lisent le code et
exécutent les fragments de shell générés, sudo, pgrep et pkill bouchonnés, en
une dizaine de secondes. Deux cibles : test_unit, et test_unit_file pour la
boucle d'écriture.

La dépendance à mobile/erplibre_home_mobile est DITE plutôt que supposée : le
lanceur l'annonce présente ou absente, et les tests du vrai transfert se
déclarent ignorés — avec la commande qui manque — au lieu de passer en silence.
Vérifié dans les trois états : dépôt absent, présent non compilé, compilé.

Au passage, compile_and_run.sh vérifie le transfert des dépôts, comme
l'installation d'une VM et par le même script.

--- EN ---

These 382 tests only ran when invoked by hand, so never. "make test" wants a
database and several minutes; these read the code and run the generated shell
fragments with sudo, pgrep and pkill stubbed, in about ten seconds. Two targets:
test_unit, and test_unit_file for the writing loop.

The dependency on mobile/erplibre_home_mobile is STATED rather than assumed: the
runner announces it present or absent, and the real-transfer tests declare
themselves skipped — naming the missing command — instead of passing quietly.
Checked in all three states: repo absent, present but unbuilt, built.

Along the way, compile_and_run.sh verifies the repo transfer, like a VM install
and through the same script.

Assisted-by: Claude Opus 5
2026-08-23 02:11:50 -04:00
1e731114f5 [IMP] script: update copyright year to 2026
Reflect the current year in all TechnoLibre
license headers across script/, test/, and docker/.

Generated by Claude Code 2.1.74 model claude-sonnet-4-6

Co-Authored-By: Mathieu Benoit <mathben@technolibre.ca>
2026-03-11 23:16:05 -04:00
526205f7ae [FIX] script test: async adapt python 3.12, support test odoo 18 erplibre 2025-11-22 00:04:19 -05:00
c1b9a5fee4 [UPD] format and update license 2025-11-08 23:53:07 -05:00
93617b1a65 [IMP] support multi version odoo on same workspace
- oficially support odoo 18 instead of odoo 16
- support postgis/postgresql 18 into docker
- change version erplibre 1.6.0
- support private environment and support local git repo manifest
- support switch odoo version
- support docker for each version
- update os installation
- upgrade python requirement
- separate virtual environment for erplibre and odoo
2025-10-31 01:36:26 -04:00
de9779cfc2 [IMP] refactoring .venv.erplibre
- erplibre separate venv erplibre and odoo
- rename python-version to python-odoo-version
- add conf/python-erplibre-version
- rename .venv to .venv.erplibre
- move .venv/repo to .venv.erplibre/bin/repo
- install pyenv into .venv.erplibre
- install poetry into .venv.odooVERSION

- first installation show odoo version to install
- can install erplibre without odoo
- update README.md information about installation with TODO
- change image from github to locally
- remove link creation .venv

- update version: remove code to force create symbolic link .venv
- use dynamic merge manifest, will be able to merge different odoo
version
- can add dev tools
- default manifest is empty to remove conflict
2025-10-31 01:34:26 -04:00
a1b9c98b5f [IMP] refactoring to support multiple version of Odoo
- change path odoo to support multiple
- conf pycharm exclude folder
- refactor run/test/coverage by use same script
2025-10-31 01:32:11 -04:00
a0c86c1866 [FIX] script test: disable test and support multiple odoo logic 2025-04-25 23:25:43 -04:00
c2850f4425 [FIX] test : restoring db use odoo12.0_base by default 2025-04-25 23:25:43 -04:00
12af324e5c [UPD] format script 2025-04-25 23:25:43 -04:00
5b103eb457 [UPD] script: format script and add licence technolibre 2024-11-02 02:26:02 -04:00
b38d67e35a [FIX] script test parallel: check file exist before crash 2024-05-03 23:13:59 -04:00
ea9be9b2ca [FIX] script python: missing color log error 2024-05-03 23:13:59 -04:00
6d0c03dc25 [FIX] script run_parallel_test: check tpl_result before use 2024-05-03 23:13:59 -04:00
c47d4d016e [ADD] script run_parallel_test: argument json_model and output_result_dir
- change approch for test, use a dict to launch test instead of asyncio
callback. Like that, can configure automatic test from external.
- output_result_dir permit to extract result and log from each test for
external execution.
- create config_testcase.json with test testcase configuration for all
test
- detect when asyncio got execution error
2024-05-03 23:13:59 -04:00
e4e6571ca8 [UPD] script run_parallel_test.py: remove dependance config from async exec 2024-05-03 23:13:59 -04:00
6e29572a2b [FIX] run test: when format before doing commit break the test
- the test pass because it's formated before
2023-12-02 14:14:23 -05:00
cbd9fba586 [UPD] format 2023-04-29 16:34:34 -04:00
542aeee85d [FIX] makefile test: move serial test in execution second test 2023-04-11 21:32:39 -04:00
8275e149ee [ADD] run_parallel_test: missing test demo_internal 2023-03-08 12:02:53 -05:00
fa844327fb [UPD] script test parallel: move async to lib 2023-02-19 04:43:46 -05:00
b711352672 [FIX] script test parallel: force check in addons when copy in sandbox 2023-02-19 04:26:18 -05:00
06bb6a0cc7 [UPD] test: help in red to read log when got error 2023-02-14 16:47:04 -05:00
3208f8f4dc [UPD] format script python 2023-01-26 00:30:52 -05:00
fcad933850 [ADD] run_parallel_test: check_git_change OCA_server-tools 2023-01-05 04:20:43 -05:00
6348c7d15a [UPD] format script 2023-01-05 04:20:43 -05:00
7ed6939907 [UPD] script: move script git, manifest, database, poetry, install
- refactor script emplacement
- update all reference
2023-01-02 21:54:20 -05:00
a4c48d5ae5 [FIX] test: move test to fix temporary the result about code_generator_data 2023-01-02 00:31:54 -05:00
fae76e3e49 [ADD] test run_parallel_test.py: checkout po/pot deleted from test
- code_generator_demo_website_multiple_snippet depend on
code_generator_demo_portal and need the template to generate po, so
checkout change.
The other solution is to copy code code_generator_demo_portal
- Cause fail when delete file is not in git
2022-12-21 22:59:02 -05:00
edd00b3515 [ADD] makefile: support test_website_attachments
- generate image test_website_attachments
- execute test
- run_parallel_test support choosing image db to restore
2022-05-22 02:34:40 -04:00
7e6fa0ec03 [ADD] test: test.sh script with coverage
- code generator coverage
2022-05-22 02:34:40 -04:00
640335a992 [ADD] support code_generator_demo_website_multiple_snippet 2022-05-22 02:20:41 -04:00
323ef08057 [UPD] test: separate parallel test for easier debugging 2022-03-29 23:43:57 -04:00
aeaa6933a8 [UPD] run_parallel_test: support all test in asyncio
- Support running test in sandbox to fix conflict test
- Support search_class_module for all template
- Add option to run without parallel
- Separate mariadb test to increase speed
- Separate test in multiple test
- Add pool thread, can set max thread
- Keep cache, async copytree, add ignore pattern instead rm
- Support all os command with asyncio
2022-02-10 00:53:59 -05:00
24e5cba22b [UPD] makefile: improve test
- prevent makefile cache to ignore test
- update image_db_create_erplibre_base
- add mariadb migrator test
- add helloworld test
- fix other test
- add isort format
- add show log of test
- add clean to remove temporary file
2022-01-24 14:09:17 -05:00