An error occurred fetching the project authors.
  1. 14 Mar, 2023 2 commits
  2. 24 May, 2022 1 commit
    • Jérome Perrin's avatar
      tests: infrastructure to rebuild and export all business templates · 83e69b6b
      Jérome Perrin authored
      This is not really a test, but it reuses runUnitTest/runTestSuite
      commands, because they are good tools to quickly create ERP5
      environment and installing business templates.
      
      To re-build and re-export all* business templates, use this command:
      
          ./bin/runTestSuite --test_suite=ReExportERP5BusinessTemplateTestSuite
      
      --node_quantity argument can also be used to process multiple
      business templates in parallel.
      
      * note that this does not actually handle all business templates, but
      only the ones for which coding style test is enabled, because most
      business templates for which it is not enabled can not be installed.
      
      This typically produces large diffs that should apply the same
      change to many files and ideally, nothing else. We also developed a
      simple tool which summarize the diff by detecting the same chunk
      present in multiple files, it can be found at
      https://lab.nexedi.com/nexedi/erp5/snippets/1171 and also below.
      
      ---
      
      from __future__ import print_function
      """report similar hunks in a patch.
      """
      __version__ = '0.1'
      
      import argparse
      import collections
      import codecs
      import unidiff # unidiff==0.7.3
      import hashlib
      
      parser = argparse.ArgumentParser()
      parser.add_argument('patch_file', type=argparse.FileType('r'), default='-', nargs='?')
      parser.add_argument('-v', '--verbose', action='count', default=0)
      args = parser.parse_args()
      
      patchset = unidiff.PatchSet(codecs.getreader('utf-8')(args.patch_file))
      
      chunks_by_filenames = collections.defaultdict(set)
      
      for patch in patchset:
        for chunk in patch:
          chunk_text = u''.join([unicode(l) for l in chunk])
          chunks_by_filenames[chunk_text].add(patch.path)
      
      for chunk_text, filenames in chunks_by_filenames.items():
        chunk_hash = hashlib.md5(chunk_text.encode('utf-8')).hexdigest()
        print("Chunk %s is present in %s files" % (chunk_hash, len(filenames)))
        if args.verbose:
          print()
          print("\n".join("  " + f for f in sorted(filenames)))
          print()
        if args.verbose > 1:
          print()
          print(chunk_text)
          print()
      83e69b6b
  3. 03 May, 2022 1 commit
  4. 21 Feb, 2022 1 commit
    • Jérome Perrin's avatar
      tests: fix counting selenium failures · 20408c24
      Jérome Perrin authored
      1b1dbf60 (tests: also consider python unittest failures in
      functional tests, 2021-06-16) was not counting properly the cases
      where we have selenium failures. In that case we only want to count
      selenium failures, if we add with the python failures from
      status_dict, we report one extra failures.
      
      The correct approach is to count selenium failures if any and otherwise
      count python failures
      Co-authored-by: Vincent Pelletier's avatarVincent Pelletier <vincent@nexedi.com>
      20408c24
  5. 06 Jul, 2021 1 commit
  6. 18 Jun, 2021 1 commit
    • Jérome Perrin's avatar
      tests: also consider python unittest failures in functional tests · 1b1dbf60
      Jérome Perrin authored
      It can happen that a test running selenium fail in python, but not in selenium,
      like for example test_result_module/20210615-CDADEC14/183
      To prevent such tests from being reported as PASS, we make the total number of
      failures being the sum of the python unittest failures and the selenium failures.
      1b1dbf60
  7. 17 Jun, 2021 1 commit
    • Kirill Smelkov's avatar
      tests: Teach test driver to pass testWendelinCore when run with wendelin.core 2 · 530e8b4e
      Kirill Smelkov authored
      This is follow-up to 5796a17a (core_test: Add test to make sure that
      wendelin.core basically works; nexedi/erp5!1429).
      
      In that commit it was said that testWendelinCore
      
          "currently passes with wendelin.core 1, which is the default.
           It also passes as live test with wendelin.core 2.
           However with wendelin.core 2 it currently fails when run on testnodes
           ...
           because we need to amend ERP5 test driver
      
           1. to run tests on a real storage instead of in-RAM Mapping Storage(*), and
           2. to spawn WCFS server for each such storage."
      
      This patch addresses that latter problem to run testWendelinCore under
      testnode infrastructure.
      
      @rafael and @jerome suggested that we can force a test to be run on a
      real storage via `runUnitTest --load --save` or via `--activity_node=n`.
      
      @rafael also suggested not to generally change the testing driver, but instead
      make step-by-step progress and first tag each test that uses wendelin.core with an
      option. Let's go this way now: runUnitTest/custom_zodb are taught to launch
      WCFS server if wendelin.core usage is requested and software is built with
      wendelin.core 2.
      
      With both changes combined testWendelinCore should now pass OK when run
      on a testnode with both wendelin.core 1 and wendelin.core 2.
      
      This patch is based on a draft patch by @rafael: https://lab.nexedi.com/rafael/erp5/commit/14e3a777.
      
      This patch also relies on recent wendelin.core 2 wcfs.py rework which
      exposed functionality to start WCFS server and to further control it:
      kirr/wendelin.core@5bfa8cf8.
      
      /cc @tomo, @romain, @jerome, @seb
      530e8b4e
  8. 29 Apr, 2021 1 commit
  9. 23 Apr, 2021 1 commit
    • Arnaud Fontaine's avatar
      ERP5Workflow: DC Workflows are now ERP5 objects (!1378). · df85ef46
      Arnaud Fontaine authored
      This also moves all Configurator Workflows in workflow_module to portal_workflow
      (workflow_module was an implementation of Workflows based on ERP5 objects and
      not using DCWorkflow code).
      
      * Workflows are now defined on on portal_workflow._chains_by_type anymore but,
        as everything else, on the Portal Type itself.
      * portal_workflow can contain and work at the same time with legacy and new
        Workflows (ERP5Type/patches/DCWorkflow.py monkey-patching DCWorkflow classes
        to provide the same API).
      * Existing Workflow Scripts should work as they are and the code can be updated
        later on to take advantage of the new API:
        + With legacy implementation Workflow {Scripts,Transitions,Worklists,States}
          were in a Folder ({scripts,transitions,worklists,states} attribute) but
          all of these are now in the Workflow itself and their IDs are prefixed
          (PropertySheet-style), for example `script_`. Legacy attributes are
          provided in new implementation to call the new API.
        + When calling a Workflow Script, `container` was bound to its parent, namely
          WF.scripts (Folder) and a Workflow Script could call another. Now `container`
          is bound to the WF itself and Workflow Scripts are in a Workflow directly.
          New implementation `scripts` attribute handle such use case.
        + Override portal_workflow.__getattr__ so that a Workflow Script can call
          another one without prefix.
      * Worklist are Predicate: Worklist filter objects based on given criterions and
        thus it makes more sense for a Worklist to be a Predicate (albeit a Predicate
        with only Identity Criterion and nothing else).
        + Criterion Properties:
          * state_variable.
          * local_roles (SECURITY_PARAMETER_ID).
          * Any Workflow Variables with for_catalog == 1.
      
      erp5_performance_test:testWorkflowPerformance were ran to compare DCWorkflow
      and ERP5Workflow implementations and it seems to be about 4% slower with the
      new implementation (legacy: 7.547, 7.593, 7.618, 7.59, 7.514 and new: 7.842,
      7.723, 7.902, 7.837, 7.875).
      
      Work done by Wenjie Zheng, Isabelle Vallet, Sebastien Robin and myself.
      df85ef46
  10. 07 Sep, 2020 2 commits
  11. 03 Aug, 2020 1 commit
  12. 02 Jul, 2020 4 commits
  13. 15 May, 2020 1 commit
    • Jérome Perrin's avatar
      ERP5TypeTestSuite: let testsuite decide the log directory · d16b9ff9
      Jérome Perrin authored
      Using the test class name was causing conflicts on some test classes.
      CodingStyleTest was a case, all test use CodingStyleTest class with an
      environment variable to control which business template is tested. In
      this case, we want one log directory for each business template.
      
      Introduce a getLogDirectoryPath method that's supposed to create and
      return the path of the directory to use for log and override this method
      for the special case of coding style test.
      d16b9ff9
  14. 12 May, 2020 1 commit
  15. 03 Apr, 2020 1 commit
  16. 02 Apr, 2020 1 commit
  17. 27 Mar, 2020 1 commit
  18. 09 Mar, 2020 1 commit
  19. 03 Dec, 2019 1 commit
  20. 06 Nov, 2019 1 commit
  21. 31 Oct, 2019 1 commit
    • Arnaud Fontaine's avatar
      ZODB Components: Migrate Products.ERP5VCS (MR !973). · 2cff7d32
      Arnaud Fontaine authored
      Moved 'git_askpass' shell script to product/ERP5/bin (considering that this
      is a very short shell script which hasn't changed in 7 years, no need to move
      it to the ZODB which would require creating a temporary file...).
      
      After updating erp5_forge, you should delete 'product/ERP5VCS/' directory
      as this will only contain '.pyc' files.
      
      /reviewed-on nexedi/erp5!973
      2cff7d32
  22. 30 Sep, 2019 1 commit
  23. 20 Sep, 2019 1 commit
  24. 10 Dec, 2018 1 commit
  25. 11 Oct, 2018 1 commit
  26. 09 Jan, 2018 1 commit
  27. 08 Jan, 2018 1 commit
  28. 07 Mar, 2017 1 commit
  29. 23 Oct, 2015 1 commit
  30. 05 Oct, 2015 1 commit
  31. 12 Jan, 2015 1 commit
  32. 10 Jan, 2014 1 commit
  33. 25 Sep, 2013 2 commits
  34. 10 Sep, 2013 1 commit
    • Arnaud Fontaine's avatar
      ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components'... · c35d24e8
      Arnaud Fontaine authored
      ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' (a771dca4) to fix tests bootstrap.
      
      The new syntax to load ZODB Tests Components is:
      runUnitTest BT_TITLE:TEST_NAME
      
      That commit was too adhoc as it was relying upon filesystem to load Tests
      Components and was not behaving like any other Components (versions was not
      available and other Components were not importable).
      
      At the end, it would have meant that a Test Component ran through runUnitTest
      and Live Tests (in ERP5 itself) would have behaved differently, thus instead:
      
      1/ Install BT_TITLE dependencies and its test dependencies (new bt property to
         specify bt to be installed only for tests on a fresh instance).
      2/ The site is loaded.
      3/ Load the test by importing it like any other Components.
      c35d24e8