コード例 #1
0
ファイル: viewTestSuitePlugin.py プロジェクト: lanl/Pavilion
    def cmd(self, args):

        if args['verbose']:
            print "Command args -> %s" % args
            #print "input test suite file -> %s\n" % args['testSuite']
        
        if (os.path.isfile(args['testSuite'])):
            with open(args['testSuite']) as file:
                # Build the test configuration
                tc = YamlTestConfig(args['testSuite'])
                
            if args['dict']:
                
                print "\nUser test suite configuration (dict style):"
                print tc.user_config_doc
                
                print "\nDefault test suite configuration (dict style):"
                print tc.default_config_doc
  
                print "\nEffective test configuration (dict style, combined User and Default):"
                print tc.get_effective_config_file()

            else:

                print "\nUser test suite configuration (yaml style):"
                tc.show_user_test_config()
    
                print "\nDefault test suite configuration (yaml style):"
                tc.show_default_config()
    
                print "\nEffective test suite configuration (yaml style, combined User and Default):"
                tc.show_effective_config_file()

        else:
            print "  Error: could not find test suite %s" % args['testSuite']
            sys.exit()