Skip to content

Commit

Permalink
Merge pull request #128 from Shao-Feng/native
Browse files Browse the repository at this point in the history
For executing Native Command on Windows Device, Add a new API in com-module
  • Loading branch information
Shao-Feng committed Mar 17, 2016
2 parents 646cbc4 + 00fb6cc commit ffaf4e2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions testkitlite/commodule/windowshttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,22 @@ def stop_debug(self):
global debug_flag
debug_flag = False

def shell_cmd_ext(self,
cmd="",
timeout=None,
boutput=False,
stdout_file=None,
stderr_file=None):
cmd_json = {}
cmd_json['cmd'] = cmd
server_url = "http://%s:8000" % self.deviceip
result = http_request(
get_url(server_url, "/general_cmd_response"), "POST", cmd_json, 30)
LOGGER.info("Response exit_code: %s" % result["exit_code"])
LOGGER.info("Response output: %s" % result["output"])
time.sleep(1)
return [int(result["exit_code"]), result["output"], ""]

######### commodule TC execution end #############

def get_target_conn(deviceip=None):
Expand Down

0 comments on commit ffaf4e2

Please sign in to comment.