Permalink
Browse files

Alan: added implementors package

  • Loading branch information...
1 parent cbef285 commit 86e0877b32987267b8f71b1ee8bb3830f40ee3d4 giles committed Feb 20, 2011
Showing with 206 additions and 6 deletions.
  1. +6 −0 Core/FTestSuite.py
  2. +13 −3 Core/FTestSuiteGUI.py
  3. +7 −0 Documentation/release notes.txt
  4. +2 −1 Release/buildctsimplzip.sh
  5. +2 −1 Release/buildctszip.sh
  6. +172 −0 Scripts/FMimic.py
  7. +4 −1 config.txt
View
@@ -41,6 +41,12 @@ def __init__(self):
level = badge.strip().title()
if (len(level) > 0):
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
self.applicationMap = {}
View
@@ -10,6 +10,8 @@
import glob, os
import shutil
+import Core.Common.FGlobals as FGlobals
+
import Core.Common.FUtils as FUtils
from Core.Common.FConstants import *
from Core.Gui.Dialog.FAppSettingsDialog import *
@@ -36,7 +38,13 @@ def makeArchive(fileList, archive):
'archive' is the file name for the archive with a full path
"""
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)
for f in fileList:
found = False
@@ -52,12 +60,14 @@ def makeArchive(fileList, archive):
if (pos < 0):
found = True
if (found):
-# print "archiving file %s" % (f)
+ print "archiving file %s" % (f)
a.write(f)
else:
- print "shipping file %s" % (f)
+ print "skipping file %s" % (f)
a.close()
+
+ print "Done making archive"
return True
except: return False
@@ -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
-fixed ImageComparator handling of transparency
@@ -1,9 +1,10 @@
#!/bin/bash
SPEC_VERSION=1.4
CTS_REVISION=1.0.1
-RELEASE_DATE=20110215
+RELEASE_DATE=20110220
cd ..
+cp Release/config_implementers.txt config.txt
rm -rf TestProcedures
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 -@
@@ -1,9 +1,10 @@
#!/bin/bash
SPEC_VERSION=1.4
CTS_REVISION=1.0.1
-RELEASE_DATE=20110215
+RELEASE_DATE=20110220
cd ..
+cp Release/config_adopters.txt config.txt
rm -rf TestProcedures
rm -rf PackagedResults
find . -type f -print | grep -v ".svn" | zip COLLADA-${SPEC_VERSION}-CTS-ADOPTER-${CTS_REVISION}-${RELEASE_DATE}.zip -@
View
@@ -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)]
View
@@ -5,11 +5,14 @@ maxPath C:\Program Files\Autodesk\3dsMax8\3dsmax.exe
maxColladaExporterFilename C:\Program Files\Autodesk\3dsMax8\plugcfg\ColladaMax.ini
xsiPath C:\Softimage\Softimage_7.5\Application\bin\XSIBATCH.bat
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
ioTimeoutMilli 60000
detectCrash True
imageComparator FPyramidDiff
pyramidDiffPath ..\PyramidDiff\Output\PyramidDiff.exe
coherencyPath ..\Core\CoherencyTest\coherencytest.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.