Data-Test-Executer Framework speziell zum Test von Datenverarbeitungen mit Datengenerierung, Systemvorbereitungen, Einspielungen, ganzheitlicher diversifizierender Vergleich
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

27 lines
940 B

#
# ----------------------------------------------------------
"""
This module implements the technique to interact via win-cmd to the test-object.
The class has to be constructed by the tool-Handling because of keyword "cmd" in the configuration,
then it will be called with the interface / abstract-class cli_abstract
"""
import os
import utils.cli_abstract
import basic
class CliFcts(utils.cli_abstract.CliFcts):
def execCmd(self, cmds):
"""
executes an array of commands on a windows-machine - the commands will be intern translated before execution
:param cmds: written in linux-bash
:return:
"""
for cmd in cmds:
cmd = self.translate(cmd)
rc = os.system(cmd)
self.comp.m.logInfo("RC "+str(rc)+" zu CMD "+cmd)
return "ok"
def translate(self, cmd):
""" translates a bash-cmd (default) into a windows-cmd """
return cmd