Commit Graph

280 Commits

Author SHA1 Message Date
Martin Trigaux 5e406734ab [FIX] module: do not crash in case of not found module
bzr revid: mat@openerp.com-20140505121840-f84u36mng3p1gstn
2014-05-05 14:18:40 +02:00
Christophe Simonis c3cf8000e6 [FIX] module loading: mark module as initialized *after* the data files have been loaded
When the registry is updating, the view verification only validates the views 
from initialized modules. Not taking the current module allow update of views
that have also an inherited view in the same module. The verification of the base view
must not try to apply the old inherited view against it as it may not be applicable
anymore. 

After module update, we re-validate all the views of this module. This is needed because
a module can declare two (or more) inherited views that are correct when applyed alone,
but not when combined with others.

bzr revid: chs@openerp.com-20140418141550-7b57b1xl4fx0rgqq
2014-04-18 16:15:50 +02:00
Raphael Collet ea167ad7ab [IMP] test cursor: code cleanup to make it more robust to concurrent accesses
bzr revid: rco@openerp.com-20140414075906-2d0i4qhe4x7czsao
2014-04-14 09:59:06 +02:00
Raphael Collet be0096c4a7 [FIX] registry: stupid typo
bzr revid: rco@openerp.com-20140409135225-6ks1kbuchba7u4li
2014-04-09 15:52:25 +02:00
Raphael Collet 980f6fc4b1 [IMP] registry: avoid every direct access registry.db, and rename attribute as registry._db
bzr revid: rco@openerp.com-20140409133515-x2ywcm0d2qkdq3hq
2014-04-09 15:35:15 +02:00
Raphael Collet e5e00e4c0a [IMP] registry: now cursor() simply returns a cursor, which may itself be used as a context manager
bzr revid: rco@openerp.com-20140409095604-joh9dt0qkma12ykm
2014-04-09 11:56:04 +02:00
Raphael Collet f0fd48c44a [IMP] http tests: implement a test cursor that keeps a transaction open accross requests
- TestCursor subclasses Cursor, and simulates commit and rollback with savepoints
 - the registry manages a test mode, in which it only uses the test cursor
 - a reentrant lock forces the serialization of parallel requests

bzr revid: rco@openerp.com-20140408151736-j0guy68i2wjexy3d
2014-04-08 17:17:36 +02:00
Raphael Collet 6bc60505f4 [IMP] registry: add method get_cursor() to simply retrieve a new cursor, and refactor code to use it
bzr revid: rco@openerp.com-20140408125122-ki0zmin3m21k2itd
2014-04-08 14:51:22 +02:00
Raphael Collet b49f536baf [IMP] tests.common: turn class methods into instance methods (this will ease some future refactoring)
bzr revid: rco@openerp.com-20140408114936-jfagg4qvft8bk3ms
2014-04-08 13:49:36 +02:00
Raphael Collet 81b84c62b1 [IMP] registry: switch for a dummy lock only during the execution of http tests
bzr revid: rco@openerp.com-20140408094513-ahtwod1q17ijohbg
2014-04-08 11:45:13 +02:00
Fabien Meghazi 4d850cdbc9 [REV] revert refresh_routing_map
bzr revid: fme@openerp.com-20140326160150-daoc6fypcmckyynk
2014-03-26 17:01:50 +01:00
Fabien Meghazi 2eea637227 [MERGE] upstream
bzr revid: fme@openerp.com-20140326152307-d0rn3yuzel11457g
2014-03-26 16:23:07 +01:00
Fabien Meghazi 0f9905b9f1 [IMP] better syntax for routing_map cache invalidation
bzr revid: fme@openerp.com-20140320153651-4lkoekzhawny0p85
2014-03-20 16:36:51 +01:00
Fabien Meghazi 14c3ffcb39 [IMP] Allow openerp.modules.load_information_from_description_file() to take an optional mod_path argument
bzr revid: fme@openerp.com-20140319085708-prrs0m4gjvuu4o86
2014-03-19 09:57:08 +01:00
chm@openerp.com bbca8bd17e [PATCH] sle
bzr revid: chm@openerp.com-20140318122250-22bt2bcfzvxowkvf
2014-03-18 13:22:50 +01:00
Fabien Meghazi 3d2452e8d4 [FIX] Force routing map to be rebuilt between each module test suite
bzr revid: fme@openerp.com-20140317151810-tgsvv0ip4you1qko
2014-03-17 16:18:10 +01:00
Antony Lesuisse 706ef452cb [IMP] tests prepend modules names when logging
bzr revid: al@openerp.com-20140317021317-4o3l1uf2ts62w1di
2014-03-17 03:13:17 +01:00
Antony Lesuisse 38d1ca1ff2 [MERGE] trunk
bzr revid: al@openerp.com-20140227161819-p9chmskfifo0rygs
2014-02-27 17:18:19 +01:00
Xavier Morel d926581bb9 [IMP] slightly improve error message at the end of a module's failed tests
bzr revid: xmo@openerp.com-20140218101847-mwsd2zolpze1xdhf
2014-02-18 11:18:47 +01:00
Xavier Morel 33076a34aa [FIX] run_unit_tests lying about its return value: it only ever returns a bool, never None
bzr revid: xmo@openerp.com-20140218095632-r4aq7gnzj4hq9u64
2014-02-18 10:56:32 +01:00
Xavier Morel 71259f09f4 [ADD] hooks to enable/disable tests running during install
also add flag for post_install run, but not used yet

bzr revid: xmo@openerp.com-20140218095452-pptez5rlpdez1ttl
2014-02-18 10:54:52 +01:00
Xavier Morel 9a22d42b8b [IMP] unwrap tests suites during module loading, prepare for storing/filtering attributes
bzr revid: xmo@openerp.com-20140217155830-dcacx7qvyf7i0i4m
2014-02-17 16:58:30 +01:00
Xavier Morel 665e2629e2 [FIX] only run test modules called test_*, similar to normal autodiscovery
bzr revid: xmo@openerp.com-20140217151521-vyg130iznzojv3e4
2014-02-17 16:15:21 +01:00
Antony Lesuisse 91b1c8472f [FIX] ir.http testing generate a router including the current module
this fix is a dirty hack, the proper fix could be a new 'installing' state in
modules, or an improved registry object.

bzr revid: al@openerp.com-20140217005137-mhrzc4znr8rqe9yu
2014-02-17 01:51:37 +01:00
Antony Lesuisse c8324bafcc [IMP] phantomjs testing
- avoid dbmanager by presetting db in the test session
- correctly handle login option
- serialize test cursor access

bzr revid: al@openerp.com-20140216212222-4o6x9uljyua3g1og
2014-02-16 22:22:22 +01:00
Xavier Morel 13fc1e885c [FIX] missed case where sys.modules values can be None
bzr revid: xmo@openerp.com-20140214153055-xguhxigsnrzy3ejq
2014-02-14 16:30:55 +01:00
Xavier Morel a86d7a548d [IMP] use TestSuite.addTests instead of manually iterating on loadTestsFromModule results
bzr revid: xmo@openerp.com-20140214145257-2alo4dvn8rmq3xfj
2014-02-14 15:52:57 +01:00
Xavier Morel 4d32dabdd6 [IMP] replace explicit iteration by listcomp
bzr revid: xmo@openerp.com-20140214143932-8nb30mkdxzt96fd5
2014-02-14 15:39:32 +01:00
Xavier Morel 2921fa339d [REM] unused variable
bzr revid: xmo@openerp.com-20140214143724-fcxy9tn8gmodi223
2014-02-14 15:37:24 +01:00
Xavier Morel 8e63677c90 [IMP] fix flow analysis warning, simplify loader code
bzr revid: xmo@openerp.com-20140214143549-sezf14rvt0cnm2cr
2014-02-14 15:35:49 +01:00
Xavier Morel f4d155fce8 [REM] redundant logger initialization
bzr revid: xmo@openerp.com-20140214143444-z5ez21g0t61jh81u
2014-02-14 15:34:44 +01:00
Antony Lesuisse 16fd821ed6 [FIX] restore testing after patching runbot
bzr revid: al@openerp.com-20140209141912-rh3yedrmjudv8jif
2014-02-09 15:19:12 +01:00
Antony Lesuisse bd16076431 fix try to fix runbot oe command
bzr revid: al@openerp.com-20140209022520-p55nlctjru58ans5
2014-02-09 03:25:20 +01:00
Antony Lesuisse 278ed718e9 new test execution engine
remove deprecated zipfile support
add preload_registry option when server is running
allow registries to be used in contruction in test mode
add a rollback test case for http tests
add a phantomjs helper

bzr revid: al@openerp.com-20140209004005-p5pwym4sqc23vw5b
2014-02-09 01:40:05 +01:00
Olivier Dony 30513f498c [FIX] modules.loading: clear caches after test rollback, to avoid stale caches
bzr revid: odo@openerp.com-20140130153835-i5wb7nr0cwl3kjee
2014-01-30 16:38:35 +01:00
Christophe Simonis 378c908d4c [MERGE] forward port of branch saas-2 up to revid 5006 chs@openerp.com-20140129140159-9vwkpr078shoonum
bzr revid: chs@openerp.com-20140129094847-4rsg0kjio0ed0rjk
bzr revid: chs@openerp.com-20140129141002-4p8fttm8ii0ogsse
2014-01-29 15:10:02 +01:00
Christophe Simonis a69f789b41 [MERGE] forward port of branch 7.0 up to revid 5224 chs@openerp.com-20140206105141-7e8bv8ordqqsswh7
bzr revid: dle@openerp.com-20140205105045-j95kduyjiq83e57z
bzr revid: dle@openerp.com-20140114173613-ruxye1m7fxtcjfim
bzr revid: dle@openerp.com-20140116161158-u95vcs3os4tk2zob
bzr revid: dle@openerp.com-20140121172737-gzawfi3ssg7xifef
bzr revid: chs@openerp.com-20140129094554-c3abc8x3qz9mpszr
bzr revid: chs@openerp.com-20140129140159-9vwkpr078shoonum
bzr revid: chs@openerp.com-20140206110220-myn57cryam1y4k9v
2014-02-06 12:02:20 +01:00
Denis Ledoux 4aeba0c12e [FIX] modules: multi worker signaling initialize variables before loading registry
bzr revid: dle@openerp.com-20140121171836-dxs7cvqcd9nxytu1
2014-01-21 18:18:36 +01:00
Christophe Simonis a45b2c6b90 merge upstream
bzr revid: chs@openerp.com-20140117092206-ha47ryhjc4ph50nl
2014-01-17 10:22:06 +01:00
Olivier Dony 212b6bc480 [FIX] modules: set initial values for multi-process signaling to None to avoid missing events
For fresh databases, the signaling sequences in the
database stays at 1 until the installation of the
first module. If several workers are hit for this
database before the first module is installed,
this database registry will be loaded with a signaling
sequence of 1. Since  was the default value, any
signal received by workers in this state was ignored 
because they thought the registry was previously
not loaded.
Using None to indicate an  sequence value
is more accurate and avoids this error

bzr revid: dle@openerp.com-20140116151157-3zlyrg48xqn2lkd0
2014-01-16 16:11:57 +01:00
Christophe Simonis 0771ca2692 [MERGE] forward port of branch saas-2 up to revid 5002 dle@openerp.com-20140114173613-ruxye1m7fxtcjfim
bzr revid: chs@openerp.com-20140115205357-arptzm69logz3osm
2014-01-15 21:53:57 +01:00
Christophe Simonis 5269664102 [FIX] correct uses of addons_path
bzr revid: chs@openerp.com-20140115180313-pqcrfmstci2w21y8
2014-01-15 19:03:13 +01:00
Christophe Simonis a6b947d84b [FIX] migration: correct the verification of module version against running server
bzr revid: chs@openerp.com-20140110162705-6vy67xbdje507bla
2014-01-10 17:27:05 +01:00
jke-openerp b7a001866d [IMP] Move threading.currentThread().testing from load_test to load_data. The purpose is to dont send mail when we are installing the demo data
bzr revid: jke@openerp.com-20131218123858-09hitdpxxqa5uh3j
2013-12-18 13:38:58 +01:00
Christophe Simonis 56bb1b9869 [MERGE] forward port of branch saas-2 up to revid 4992 chs@openerp.com-20131202105848-33gcz1715w370rve
bzr revid: chs@openerp.com-20131127110757-5kaay2kcxq0ysb59
bzr revid: chs@openerp.com-20131127161639-yur4rdh3wx43kxle
bzr revid: chs@openerp.com-20131127180647-f8uws77gaym5kfvd
bzr revid: chs@openerp.com-20131202110030-gf20dv2uj5fqv7c2
2013-12-02 12:00:30 +01:00
Christophe Simonis c901141cec [FIX] module loading: do not warn about missing access rules for AbstractModels
bzr revid: chs@openerp.com-20131127180530-aoslbam8almrmpbl
2013-11-27 19:05:30 +01:00
Christophe Simonis ab386c0f5f [MERGE] forward port of branch saas-2 up to revid 4984 chs@openerp.com-20131125151017-lmj53bxg1pfrr4a7
bzr revid: chs@openerp.com-20131125154140-cpbk4tcdml2a3b9n
2013-11-25 16:41:40 +01:00
Denis Ledoux 6fd552c3ce [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 5139 rev-id: dle@openerp.com-20131121132305-qjlclgz5v9tze1fr
bzr revid: odo@openerp.com-20131120102545-2tlp031yib6viz35
bzr revid: chs@openerp.com-20131120161708-c8sbom592moukwxw
bzr revid: dle@openerp.com-20131121155457-lh7fzouk2upeiu16
2013-11-21 16:54:57 +01:00
Christophe Simonis cd810ea7bd merge upstream
bzr revid: chs@openerp.com-20131119185353-qfhaice61xg7qfhn
2013-11-19 19:53:53 +01:00
Martin Trigaux 7ae9e1c86d [FIX] registry: missing a threading.RLock in RegistryManager.get():
if no registry exists and several calls to RegistryManager.get() are called at the same time
by several threads, several registries will be created one after the other and only the last
one will be kept in cls.registries (courtesy of Guewen Baconnier (Camptocamp)

Invert behaviour of commit 3685 because, at that time, the new trigger the schedule_cron_jobs method which ran another lock and called get on the registry. We had a deadlock with the cron. This is no longer the case as we don't call the same method at the end of the creation of the registry and it does not trigger a lock

bzr revid: mat@openerp.com-20131114144401-k00podawlem7cjd1
2013-11-14 15:44:01 +01:00