예제 #1
0
    def quiet_exec_cmd(self, cmd, exit_code=0):
        print "Quiet Executing command : %s" % cmd

        try:
            return mongoctl_main.do_main(cmd.split(" ")[1:])
        except Exception, e:
            print ("WARNING: failed to quiet execute command '%s'. Cause: %s " % (cmd_display_str(cmd), e))
예제 #2
0
    def quiet_exec_cmd(self, cmd, exit_code=0):
        print "Quiet Executing command : %s" % cmd

        try:
            return mongoctl_main.do_main(cmd.split(" ")[1:])
        except Exception, e:
            print("WARNING: failed to quiet execute command '%s'. Cause: %s " %
                  (cmd_display_str(cmd), e))
예제 #3
0
    def exec_assert_cmd(self, cmd, exit_code=0):
        print "++++++++++ Testing command : %s" % cmd

        try:
            return mongoctl_main.do_main(cmd.split(" ")[1:])
        except Exception, e:
            print("Error while executing test command '%s'. Cause: %s " %
                  (cmd, e))
            print "================= STACK TRACE ================"
            traceback.print_exc()
            print "Failing..."
            self.fail()
예제 #4
0
    def exec_assert_cmd(self, cmd, exit_code=0):
        print "++++++++++ Testing command : %s" % cmd

        try:
            return mongoctl_main.do_main(cmd.split(" ")[1:])
        except Exception, e:
            print("Error while executing test command '%s'. Cause: %s " %
                  (cmd, e))
            print "================= STACK TRACE ================"
            traceback.print_exc()
            print "Failing..."
            self.fail()
예제 #5
0
    def exec_assert_cmd(self, cmd, exit_code=0):
        print "++++++++++ Testing command : %s" % cmd_display_str(cmd)

        try:
            # output =  execute_command(cmd, shell=True, cwd=get_mongoctl_module_dir())
            # print output
            return mongoctl_main.do_main(cmd)
        except Exception, e:
            print ("Error while executing test command '%s'. Cause: %s " % (cmd_display_str(cmd), e))
            if isinstance(e, CalledProcessError):
                print "#### Command output ####"
                print e.output
                print "###################"

            print "================= STACK TRACE ================"
            traceback.print_exc()
            print "Failing..."
            self.fail()
예제 #6
0
    def exec_assert_cmd(self, cmd, exit_code=0):
        print "++++++++++ Testing command : %s" % cmd_display_str(cmd)

        try:
            #output =  execute_command(cmd, shell=True, cwd=get_mongoctl_module_dir())
            #print output
            return mongoctl_main.do_main(cmd)
        except Exception, e:
            print("Error while executing test command '%s'. Cause: %s " %
                  (cmd_display_str(cmd), e))
            if isinstance(e, CalledProcessError):
                print "#### Command output ####"
                print e.output
                print "###################"

            print "================= STACK TRACE ================"
            traceback.print_exc()
            print "Failing..."
            self.fail()