Skip to content

Commit

Permalink
Alan: added implementors package
Browse files Browse the repository at this point in the history
  • Loading branch information
giles committed Feb 20, 2011
1 parent cbef285 commit 86e0877
Show file tree
Hide file tree
Showing 7 changed files with 206 additions and 6 deletions.
6 changes: 6 additions & 0 deletions Core/FTestSuite.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ def __init__(self):
level = badge.strip().title() level = badge.strip().title()
if (len(level) > 0): if (len(level) > 0):
FGlobals.badgeLevels.append(level) FGlobals.badgeLevels.append(level)

# Further parse the adopter package status
FGlobals.adoptersPackage = False
if configDict.has_key("adoptersPackage"):
FGlobals.adoptersPackage = configDict["adoptersPackage"]
print "IsAdopters %s" % (FGlobals.adoptersPackage)


# import the application specific scripts # import the application specific scripts
self.applicationMap = {} self.applicationMap = {}
Expand Down
16 changes: 13 additions & 3 deletions Core/FTestSuiteGUI.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import glob, os import glob, os
import shutil import shutil


import Core.Common.FGlobals as FGlobals

import Core.Common.FUtils as FUtils import Core.Common.FUtils as FUtils
from Core.Common.FConstants import * from Core.Common.FConstants import *
from Core.Gui.Dialog.FAppSettingsDialog import * from Core.Gui.Dialog.FAppSettingsDialog import *
Expand All @@ -36,7 +38,13 @@ def makeArchive(fileList, archive):
'archive' is the file name for the archive with a full path 'archive' is the file name for the archive with a full path
""" """
try: try:
typeList = [".png", ".dae", ".html", ".csv", ".sha", ".log", ".py", ".txt"] print "making archive: %s adopters: %s " % (archive, FGlobals.adoptersPackage)
if (FGlobals.adoptersPackage == 'True'):
typeList = [".png", ".dae", ".html", ".csv", ".sha", ".log", ".py", ".txt"]
else:
typeList = [".html", ".csv", ".sha", ".txt", ".py"]

print "TypeList: %s" % (typeList)
a = zipfile.ZipFile(archive, 'w', zipfile.ZIP_DEFLATED) a = zipfile.ZipFile(archive, 'w', zipfile.ZIP_DEFLATED)
for f in fileList: for f in fileList:
found = False found = False
Expand All @@ -52,12 +60,14 @@ def makeArchive(fileList, archive):
if (pos < 0): if (pos < 0):
found = True found = True
if (found): if (found):
# print "archiving file %s" % (f) print "archiving file %s" % (f)
a.write(f) a.write(f)
else: else:
print "shipping file %s" % (f) print "skipping file %s" % (f)


a.close() a.close()

print "Done making archive"
return True return True
except: return False except: return False


Expand Down
7 changes: 7 additions & 0 deletions Documentation/release notes.txt
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,10 @@
CTS_V1.0.1
Added Implementors Package
Updated Install documentation to include Admin mode requirement

CTS_V1.0.0
Initial Public release

CTS_v0.9.3 CTS_v0.9.3
-fixed ImageComparator handling of transparency -fixed ImageComparator handling of transparency


Expand Down
3 changes: 2 additions & 1 deletion Release/buildctsimplzip.sh
Original file line number Original file line Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/bin/bash #!/bin/bash
SPEC_VERSION=1.4 SPEC_VERSION=1.4
CTS_REVISION=1.0.1 CTS_REVISION=1.0.1
RELEASE_DATE=20110215 RELEASE_DATE=20110220


cd .. cd ..
cp Release/config_implementers.txt config.txt
rm -rf TestProcedures rm -rf TestProcedures
rm -rf PackagedResults rm -rf PackagedResults
find . -type f -print | grep -v ".svn" | grep -v "Feeling" | grep -v "FViewer" | grep -v "Coherency" | zip COLLADA-${SPEC_VERSION}-CTS-IMPLEMENTER-${CTS_REVISION}-${RELEASE_DATE}.zip -@ find . -type f -print | grep -v ".svn" | grep -v "Feeling" | grep -v "FViewer" | grep -v "Coherency" | zip COLLADA-${SPEC_VERSION}-CTS-IMPLEMENTER-${CTS_REVISION}-${RELEASE_DATE}.zip -@
3 changes: 2 additions & 1 deletion Release/buildctszip.sh
Original file line number Original file line Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/bin/bash #!/bin/bash
SPEC_VERSION=1.4 SPEC_VERSION=1.4
CTS_REVISION=1.0.1 CTS_REVISION=1.0.1
RELEASE_DATE=20110215 RELEASE_DATE=20110220


cd .. cd ..
cp Release/config_adopters.txt config.txt
rm -rf TestProcedures rm -rf TestProcedures
rm -rf PackagedResults rm -rf PackagedResults
find . -type f -print | grep -v ".svn" | zip COLLADA-${SPEC_VERSION}-CTS-ADOPTER-${CTS_REVISION}-${RELEASE_DATE}.zip -@ find . -type f -print | grep -v ".svn" | zip COLLADA-${SPEC_VERSION}-CTS-ADOPTER-${CTS_REVISION}-${RELEASE_DATE}.zip -@
172 changes: 172 additions & 0 deletions Scripts/FMimic.py
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,172 @@
# Copyright (C) 2006 Khronos Group
# Available only to Khronos members.
# Distribution of this file or its content is strictly prohibited.

import os.path

import Core.Common.FUtils as FUtils
from Core.Logic.FSettingEntry import *
from Scripts.FApplication import *

class FMimic (FApplication):
"""The class which represents mimic to the testing framework.
"""

__SCRIPT_EXTENSION = ".py"

def __init__(self, configDict):
"""__init__() -> FMimic"""
FApplication.__init__(self, configDict)
self.__script = None
self.__currentFilename = None
self.__currentImageName = None
self.__currentImportProperName = None
self.__testImportCount = 0
self.__testRenderCount = 0
self.__workingDir = None

def GetPrettyName(self):
"""GetPrettyName() -> str
Implements FApplication.GetPrettyName()
"""
return "Mimic 1.0"

def GetSettingsForOperation(self, operation):
"""GetSettingsForOperation(operation) -> list_of_FSettingEntry
Implements FApplication.GetSettingsForOperation()
"""
if (operation == IMPORT):
return []
elif (operation == EXPORT):
return []
elif (operation == RENDER):
return []
else:
return []

def BeginScript(self, workingDir):
"""BeginScript(workingDir) -> None
Implements FApplication.BeginScript()
"""
pyFilename = ("script" + str(self.applicationIndex) +
FMimic.__SCRIPT_EXTENSION)
self.__script = open(os.path.join(workingDir, pyFilename), "w")
self.WriteCrashDetectBegin(self.__script)

self.__testImportCount = 0
self.__testRenderCount = 0
self.__workingDir = workingDir

def EndScript(self):
"""EndScript() -> None
Implements FApplication.EndScript()
"""
self.__script.close()

def RunScript(self):
"""RunScript() -> None
Implements FApplication.RunScript()
"""
if (not os.path.isfile(self.configDict["mimicPath"])):
print "Mimic does not exist"
return True

print ("start running " + os.path.basename(self.__script.name))
command = ("\"" + self.configDict["pythonExecutable"] + "\" " +
"\"" + self.__script.name + "\"")

returnValue = subprocess.call(command)

if (returnValue == 0):
print "finished running " + os.path.basename(self.__script.name)
else:
print "crashed running " + os.path.basename(self.__script.name)

return (returnValue == 0)

def WriteImport(self, filename, logname, outputDir, settings, isAnimated, cameraRig, lightingRig):
"""WriteImport(filename, logname, outputDir, settings, isAnimated, cameraRig, lightingRig) -> list_of_str
"""
outputFormat = ".png"

command = ("\"" + self.configDict["mimicPath"] + "\" ")


baseName = FUtils.GetProperFilename(filename)
self.__currentImportProperName = baseName
outputFilename = os.path.join(outputDir, baseName + "_out" + ".dae")
self.__currentFilename = outputFilename
imageFilename = os.path.join(outputDir, "result" + outputFormat)
self.__currentImagename = imageFilename
command = (command + "\"" + filename +
"\" \"" + outputFilename + "\" \"" + imageFilename + "\"")

print "***Importting: %s" % (filename)
print " Command %s" % (command)
self.WriteCrashDetect(self.__script, command, logname)

self.__testImportCount = self.__testImportCount + 1

return [os.path.normpath(outputFilename)]


def WriteRender(self, logname, outputDir, settings, isAnimated, cameraRig, lightingRig):
"""WriteRender(logname, outputDir, settings, isAnimated, cameraRig, lightingRig) -> list_of_str
Implements FApplication.WriteRender()
"""
print "***Render outputDir: %s" % (outputDir)

outputFormat = ".png"
command = ("\"" + self.configDict["mimicRenderPath"] + "\" ")

baseName = self.__currentImportProperName;

outputFilename = os.path.join(outputDir, baseName + "_out" + ".dae")
imageFilename = os.path.join(outputDir, "result" + outputFormat)
self.__currentImagename = imageFilename
command = (command + "\"" + self.__currentFilename +
"\" \"" + outputFilename + "\" \"" + imageFilename + "\"")

print " Command %s" % (command)
self.WriteCrashDetect(self.__script, command, logname)

self.__testRenderCount = self.__testRenderCount + 1
return [os.path.normpath(imageFilename),]


def WriteExport(self, logname, outputDir, settings, isAnimated, cameraRig, lightingRig):
"""WriteImport(logname, outputDir, settings, isAnimated, cameraRig, lightingRig) -> list_of_str
Implements FApplication.WriteExport()
"""
outputFormat = ".png"
command = ("\"" + self.configDict["mimicPath"] + "\" ")

print "***Export outputDir: %s" % (outputDir)
baseName = self.__currentImportProperName;

outputFilename = os.path.join(outputDir, baseName + "_out" + ".dae")
imageFilename = os.path.join(outputDir, baseName + outputFormat)
self.__currentImagename = imageFilename
command = (command + "\"" + self.__currentFilename +
"\" \"" + outputFilename + "\" \"" + imageFilename + "\"")

print " Command %s" % (command)
self.WriteCrashDetect(self.__script, command, logname)

return [os.path.normpath(outputFilename)]
5 changes: 4 additions & 1 deletion config.txt
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ maxPath C:\Program Files\Autodesk\3dsMax8\3dsmax.exe
maxColladaExporterFilename C:\Program Files\Autodesk\3dsMax8\plugcfg\ColladaMax.ini maxColladaExporterFilename C:\Program Files\Autodesk\3dsMax8\plugcfg\ColladaMax.ini
xsiPath C:\Softimage\Softimage_7.5\Application\bin\XSIBATCH.bat xsiPath C:\Softimage\Softimage_7.5\Application\bin\XSIBATCH.bat
FXComposerPath C:\Program Files\NVIDIA Corporation\FX Composer 2\FXComposer2.exe FXComposerPath C:\Program Files\NVIDIA Corporation\FX Composer 2\FXComposer2.exe
mimicPath ..\Documentation\HowToAddSoftware\TestIntegration\mimic.bat
mimicRenderPath ..\Documentation\HowToAddSoftware\TestIntegration\mimic_render.bat
pythonExecutable C:\Python24\python.exe pythonExecutable C:\Python24\python.exe
ioTimeoutMilli 60000 ioTimeoutMilli 60000
detectCrash True detectCrash True
imageComparator FPyramidDiff imageComparator FPyramidDiff
pyramidDiffPath ..\PyramidDiff\Output\PyramidDiff.exe pyramidDiffPath ..\PyramidDiff\Output\PyramidDiff.exe
coherencyPath ..\Core\CoherencyTest\coherencytest.exe coherencyPath ..\Core\CoherencyTest\coherencytest.exe
schemaValidatePath ..\Core\SchemaValidate.exe schemaValidatePath ..\Core\SchemaValidate.exe
badgeLevels Baseline, Superior, Exemplary, Fx, Physics badgeLevels Baseline, Superior, Exemplary, Fx, Physics
adoptersPackage True

0 comments on commit 86e0877

Please sign in to comment.