Example #1
0
import sys
from TestDefinitions import testManager
test_name = sys.argv[1].strip("' \"")
interactive = sys.argv[2].strip("' \"") if ( len( sys.argv ) > 2 ) else False
baseline_dir = sys.argv[3].strip("' \"") if ( len( sys.argv ) > 3 ) else None
print "Baseline dir: ", baseline_dir
testManager.runTest( test_name, interactive, baseline_dir )
import sys
from TestDefinitions import testManager
interactive = ( len(sys.argv) > 1 ) and ( sys.argv[1] == '-i' )
testManager.runTest( 'dv3d_constituents_test', interactive )
Example #3
0
        if  interactive: 
            print "Type <Enter> to continue and update ref image ( type 'n' to skip update )." 
            sys.stdout.flush()
            line = sys.stdin.readline()
            if line[0] <> 'n':  self.update_image() 
        sys.exit(ret)
        
    def update_image(self):
        print "Saving reference image to %s " % self.image_name       
        self.canvas.png( self.image_name )
        
    def writeCMakeDef( self, f ):
        f.write( "add_test(%s\n" % self.name )
        f.write( "  \"${PYTHON_EXECUTABLE}\"\n"  )
        f.write( "  ${cdat_SOURCE_DIR}/testing/dv3d/dv3d_execute_test.py\n" )
        f.write( "  '%s'\n" % self.name )
        f.write( "  '${BASELINE_DIR}'\n" )
        f.write( ")\n\n\n")
#        source_file = os.path.join( self.test_dir, "%s.py" % self.name )
#         f1 = open( source_file, 'w' )
#         f1.write( "import sys\n")
#         f1.write( "from TestDefinitions import testManager\n"  )
#         f1.write( "interactive = ( len(sys.argv) > 1 ) and ( sys.argv[1] == '-i' )\n")
#         f1.write( "testManager.runTest( '%s', interactive )\n" % self.name )
#         f1.close()
        
        
if __name__ == '__main__':
    from TestDefinitions import testManager    
    testManager.runTest( 'dv3d_hovmoller_test' )
Example #4
0
import sys
from TestDefinitions import testManager
interactive = (len(sys.argv) > 1) and (sys.argv[1] == '-i')
testManager.runTest('dv3d_surface_test', interactive)
Example #5
0
import sys
from TestDefinitions import testManager
test_name = sys.argv[1].strip("' \"")
interactive = sys.argv[2].strip("' \"") if (len(sys.argv) > 2) else False
baseline_dir = sys.argv[3].strip("' \"") if (len(sys.argv) > 3) else None
print "Baseline dir: ", baseline_dir
testManager.runTest(test_name, interactive, baseline_dir)
Example #6
0
import sys
from TestDefinitions import testManager
interactive = ( len(sys.argv) > 1 ) and ( sys.argv[1] == '-i' )
testManager.runTest( 'dv3d_surface_test', interactive )
Example #7
0
import sys
from TestDefinitions import testManager
interactive = ( len(sys.argv) > 1 ) and ( sys.argv[1] == '-i' )
testManager.runTest( 'dv3d_volume_test', interactive )
Example #8
0
import sys
from TestDefinitions import testManager
interactive = (len(sys.argv) > 1) and (sys.argv[1] == '-i')
testManager.runTest('dv3d_volume_test', interactive)
Example #9
0
import sys
from TestDefinitions import testManager
interactive = (len(sys.argv) > 1) and (sys.argv[1] == '-i')
testManager.runTest('dv3d_slider_test', interactive)
Example #10
0
import sys
from TestDefinitions import testManager

interactive = (len(sys.argv) > 1) and (sys.argv[1] == "-i")
testManager.runTest("dv3d_slider_test", interactive)
Example #11
0
            print "Type <Enter> to continue and update ref image ( type 'n' to skip update )." 
            sys.stdout.flush()
            line = sys.stdin.readline()
            if line[0] <> 'n':  self.update_image() 
        sys.exit(ret)
        
    def update_image(self):
        print "Saving reference image to %s " % self.image_name       
        self.canvas.png( self.image_name )
        
    def writeCMakeDef( self, f ):
        f.write( "add_test(%s\n" % self.name )
        f.write( "  ${CMAKE_INSTALL_PREFIX}/bin/python\n"  )
        f.write( "  ${cdat_SOURCE_DIR}/testing/dv3d/%s.py\n" % self.name )
#        f.write( "  ${cdat_SOURCE_DIR}/testing/dv3d/images/%s.png\n" % self.name )
        f.write( ")\n\n\n")
        source_file = os.path.join( self.test_dir, "%s.py" % self.name )
        f1 = open( source_file, 'w' )
        f1.write( "import sys\n")
        f1.write( "from TestDefinitions import testManager\n"  )
        f1.write( "interactive = ( len(sys.argv) > 1 ) and ( sys.argv[1] == '-i' )\n")
        f1.write( "testManager.runTest( '%s', interactive )\n" % self.name )
        f1.close()
        
        
if __name__ == '__main__':
    from TestDefinitions import testManager    
#    testManager.runTests()
    testManager.runTest( 'dv3d_slider_test', True )
#    testManager.showTest( 'dv3d_constituents_test' )