~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/dbqp.py

  • Committer: patrick crews
  • Date: 2011-03-02 00:52:00 UTC
  • mto: (2213.1.3 build) (2215.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 2214.
  • Revision ID: gleebix@gmail.com-20110302005200-95c0k9286hljsudv
Nested try/excepts in try/finally to accomodate rhel's crazy-old python 2.4 : (

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
execution_manager = None
52
52
 
53
53
try:
54
 
    # Some system-level work is constant regardless
55
 
    # of the test to be run
56
 
    system_manager = systemManager(variables)
57
 
 
58
 
    # Create our server_manager
59
 
    server_manager = serverManager(system_manager, variables)
60
 
 
61
 
    # Get our mode-specific test_manager and test_executor
62
 
    (test_manager,test_executor) = handle_mode(variables, system_manager)
63
 
 
64
 
    # Gather our tests for execution
65
 
    test_manager.gather_tests()
66
 
 
67
 
    # Initialize test execution manager
68
 
    execution_manager = executionManager(server_manager, system_manager
69
 
                                    , test_manager, test_executor
70
 
                                    , variables)
71
 
 
72
 
    # Execute our tests!
73
 
    execution_manager.execute_tests()
74
 
 
75
 
except Exception, e:
76
 
   print Exception, e
77
 
 
78
 
except KeyboardInterrupt:
79
 
  print "\n\nDetected <Ctrl>+c, shutting down and cleaning up..."
 
54
    # We do this nested try to accomodate red hat
 
55
    # running python 2.4...seriously?  2.4?
 
56
    try:
 
57
        # Some system-level work is constant regardless
 
58
        # of the test to be run
 
59
        system_manager = systemManager(variables)
 
60
 
 
61
        # Create our server_manager
 
62
        server_manager = serverManager(system_manager, variables)
 
63
 
 
64
        # Get our mode-specific test_manager and test_executor
 
65
        (test_manager,test_executor) = handle_mode(variables, system_manager)
 
66
 
 
67
        # Gather our tests for execution
 
68
        test_manager.gather_tests()
 
69
 
 
70
        # Initialize test execution manager
 
71
        execution_manager = executionManager(server_manager, system_manager
 
72
                                        , test_manager, test_executor
 
73
                                        , variables)
 
74
 
 
75
        # Execute our tests!
 
76
        execution_manager.execute_tests()
 
77
    
 
78
    except Exception, e:
 
79
       print Exception, e
 
80
 
 
81
    except KeyboardInterrupt:
 
82
      print "\n\nDetected <Ctrl>+c, shutting down and cleaning up..."
80
83
 
81
84
finally:
82
85
# TODO - make a more robust cleanup