Regression tests: Fix finding aassimp.exe on VC9 default build. Look for x86 executable if x64 is not found. Create dump output dir if does not exist (broke the script). Report where assimp.exe was looked in. Add todos for ignoring multi dot extensions from test like .skeleton.xml. Rebuild ds.zip via gen_db.py, success rate went from 40% to 99%. Seems these were not updated in a while (2-3 years :).
parent
8a5041ea11
commit
4f82b02958
Binary file not shown.
|
@ -188,6 +188,7 @@ if __name__ == "__main__":
|
|||
stdout=subprocess.PIPE).communicate()
|
||||
ext_list = str(ext_list).lower().split(";")
|
||||
|
||||
# todo: Fix for multi dot extensions like .skeleton.xml
|
||||
ext_list = list(filter(lambda f: not f in settings.exclude_extensions,
|
||||
map(clean, ext_list)))
|
||||
|
||||
|
|
|
@ -172,6 +172,12 @@ def process_dir(d, outfile_results, zipin, result):
|
|||
#print("Didn't find "+fullpath+" (Hash is "+filehash+") in database")
|
||||
continue
|
||||
|
||||
# Ignore extensions via settings.py configured list
|
||||
# todo: Fix for multi dot extensions like .skeleton.xml
|
||||
ext = os.path.splitext(fullpath)[1].lower()
|
||||
if ext != "" and ext in settings.exclude_extensions:
|
||||
continue
|
||||
|
||||
print("-"*60 + "\n " + os.path.realpath(fullpath) + " pp: " + pppreset)
|
||||
|
||||
outfile_actual = mkoutputdir_andgetpath(fullpath, filehash, "ACTUAL")
|
||||
|
|
|
@ -46,11 +46,16 @@ test scripts rely on this)
|
|||
"""
|
||||
|
||||
import os
|
||||
|
||||
# -------------------------------------------------------------------------------
|
||||
# List of file extensions to be excluded from the regression suite
|
||||
# File extensions are case insensitive
|
||||
# -------------------------------------------------------------------------------
|
||||
exclude_extensions = [".lws",".assbin",".assxml",".txt",".jpeg",".jpg",".png",".gif",".tga",".bmp"]
|
||||
exclude_extensions = [
|
||||
".lws", ".assbin", ".assxml", ".txt", ".md",
|
||||
".jpeg", ".jpg", ".png", ".gif", ".tga", ".bmp",
|
||||
".skeleton", ".skeleton.xml"
|
||||
]
|
||||
|
||||
# -------------------------------------------------------------------------------
|
||||
# Post processing configurations to be included in the test. The
|
||||
|
@ -93,8 +98,8 @@ database_name = "db"
|
|||
# List of directories to be processed. Paths are processed recursively.
|
||||
# -------------------------------------------------------------------------------
|
||||
model_directories = [
|
||||
os.path.join("..","models"),
|
||||
os.path.join("..","models-nonbsd")
|
||||
os.path.join("..","models"),
|
||||
os.path.join("..","models-nonbsd")
|
||||
]
|
||||
|
||||
# -------------------------------------------------------------------------------
|
||||
|
@ -114,5 +119,8 @@ dump_header_skip = 500
|
|||
# -------------------------------------------------------------------------------
|
||||
results = os.path.join("..","results")
|
||||
|
||||
# Create results directory if it does not exist
|
||||
if not os.path.exists(results):
|
||||
os.makedirs(results)
|
||||
|
||||
# vim: ai ts=4 sts=4 et sw=4
|
||||
|
|
|
@ -87,20 +87,28 @@ def find_assimp_or_die():
|
|||
|
||||
global assimp_bin_path
|
||||
if os.name == "nt":
|
||||
search_x86 = [
|
||||
os.path.join("..","..","bin","assimpcmd_release-dll_Win32","assimp.exe"),
|
||||
os.path.join("..","..","bin","x86","assimp"),
|
||||
os.path.join("..","..","bin","Release","assimp.exe")
|
||||
]
|
||||
if platform.machine() == "x86":
|
||||
search = [os.path.join("..","..","bin","assimpcmd_release-dll_Win32","assimp.exe"),
|
||||
os.path.join("..","..","bin","x86","assimp")]
|
||||
|
||||
search = search_x86
|
||||
else: # amd64, hopefully
|
||||
search = [os.path.join("..","..","bin","assimpcmd_release-dll_x64","assimp.exe"),
|
||||
os.path.join("..","..","bin","x64","assimp")]
|
||||
search = [
|
||||
os.path.join("..","..","bin","assimpcmd_release-dll_x64","assimp.exe"),
|
||||
os.path.join("..","..","bin","x64","assimp")
|
||||
]
|
||||
# x64 platform does not guarantee a x64 build. Also look for x86 as last paths.
|
||||
search += search_x86
|
||||
|
||||
assimp_bin_path = locate_file(search)
|
||||
if assimp_bin_path is None:
|
||||
print("Can't locate assimp_cmd binary")
|
||||
print("Looked in", search)
|
||||
sys.exit(-5)
|
||||
|
||||
print("Located assimp/assimp_cmd binary at ",assimp_bin_path)
|
||||
print("Located assimp/assimp_cmd binary from", assimp_bin_path)
|
||||
elif os.name == "posix":
|
||||
#search = [os.path.join("..","..","bin","gcc","assimp"),
|
||||
# os.path.join("/usr","local","bin",'assimp')]
|
||||
|
@ -110,8 +118,6 @@ def find_assimp_or_die():
|
|||
print("Unsupported operating system")
|
||||
sys.exit(-5)
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
find_assimp_or_die()
|
||||
|
||||
|
|
Loading…
Reference in New Issue