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