settings.py 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. #!/usr/bin/env python3
  2. # -*- Coding: UTF-8 -*-
  3. # ---------------------------------------------------------------------------
  4. # Open Asset Import Library (ASSIMP)
  5. # ---------------------------------------------------------------------------
  6. #
  7. # Copyright (c) 2006-2020, ASSIMP Development Team
  8. #
  9. # All rights reserved.
  10. #
  11. # Redistribution and use of this software in source and binary forms,
  12. # with or without modification, are permitted provided that the following
  13. # conditions are met:
  14. #
  15. # * Redistributions of source code must retain the above
  16. # copyright notice, this list of conditions and the
  17. # following disclaimer.
  18. #
  19. # * Redistributions in binary form must reproduce the above
  20. # copyright notice, this list of conditions and the
  21. # following disclaimer in the documentation and/or other
  22. # materials provided with the distribution.
  23. #
  24. # * Neither the name of the ASSIMP team, nor the names of its
  25. # contributors may be used to endorse or promote products
  26. # derived from this software without specific prior
  27. # written permission of the ASSIMP Development Team.
  28. #
  29. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  30. # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  31. # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  32. # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  33. # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  34. # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  35. # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  36. # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  37. # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  38. # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  39. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  40. # ---------------------------------------------------------------------------
  41. """Shared settings for the regression suite (bold builder and
  42. test scripts rely on this)
  43. """
  44. import os
  45. # -------------------------------------------------------------------------------
  46. # Files to ignore (with reason)
  47. #
  48. # pond.0.ply - loads with 40k identical triangles, causing postprocessing
  49. # to have quadratic runtime.
  50. # -------------------------------------------------------------------------------
  51. files_to_ignore = ["pond.0.ply"]
  52. # -------------------------------------------------------------------------------
  53. # List of file extensions to be excluded from the regression suite
  54. # File extensions are case insensitive
  55. # -------------------------------------------------------------------------------
  56. exclude_extensions = [
  57. ".assbin", ".assxml", ".txt", ".md",
  58. ".jpeg", ".jpg", ".png", ".gif", ".tga", ".bmp",
  59. ".skeleton", ".skeleton.xml", ".license", ".mtl", ".material", ".pk3"
  60. ]
  61. # -------------------------------------------------------------------------------
  62. # Post processing configurations to be included in the test. The
  63. # strings are parameters for assimp_cmd, see assimp_cmd's doxydoc
  64. # for more details.
  65. # The defaults are (validate-data-structure is always enabled, for
  66. # self-explanatory reasons :-):
  67. #
  68. # '-cfull' :apply all post processing except 'og' and 'ptv' (optimize-scenegraph)
  69. # '-og -om' :run optimize-scenegraph in combination with optimize-meshes.
  70. # '-vds -jiv' :join-identical-vertices alone. This is a hotspot where
  71. # floating-point inaccuracies can cause severe damage.
  72. # '-ptv': transform all meshes to world-space
  73. # As you can see, not all possible combinations of pp steps are covered -
  74. # but at least each step is executed at least once on each model.
  75. # -------------------------------------------------------------------------------
  76. pp_configs_to_test = [
  77. "-cfull",
  78. "-og -om -vds",
  79. "-vds -jiv",
  80. "-ptv -gsn -cts -db",
  81. # this is especially important: if no failures are present with this
  82. # preset, the regression is most likely caused by the post
  83. # processing pipeline.
  84. ""
  85. ]
  86. # -------------------------------------------------------------------------------
  87. # Name of the regression database file to be used
  88. # gen_db.py writes to this directory, run.py checks against this directory.
  89. # If a zip file with the same name exists, its contents are favoured to a
  90. # normal directory, so in order to test against unzipped files the ZIP needs
  91. # to be deleted.
  92. # -------------------------------------------------------------------------------
  93. database_name = "db"
  94. # -------------------------------------------------------------------------------
  95. # List of directories to be processed. Paths are processed recursively.
  96. # -------------------------------------------------------------------------------
  97. model_directories = [
  98. os.path.join("..","models"),
  99. os.path.join("..","models-nonbsd")
  100. ]
  101. # -------------------------------------------------------------------------------
  102. # Remove the original database files after the ZIP has been built?
  103. # -------------------------------------------------------------------------------
  104. remove_old = True
  105. # -------------------------------------------------------------------------------
  106. # Bytes to skip at the beginning of a dump. This skips the file header, which
  107. # is currently the same 500 bytes header for both assbin, assxml and minidumps.
  108. # -------------------------------------------------------------------------------
  109. dump_header_skip = 500
  110. # -------------------------------------------------------------------------------
  111. # Directory to write all results and logs to. The dumps pertaining to failed
  112. # tests are written to a subfolder of this directory ('tmp').
  113. # -------------------------------------------------------------------------------
  114. results = os.path.join("..","results")
  115. # Create results directory if it does not exist
  116. if not os.path.exists(results):
  117. os.makedirs(results)
  118. # vim: ai ts=4 sts=4 et sw=4