Auto-tools/Projects/SUTAgent/CommandReference
< Auto-tools | Projects | SUTAgent
Jump to navigation
Jump to search
consider info (requires for sut_tools to get screen resolution), inst/updt, clok (required for talos) consider making exec more well defined for: async vs sync launching of process, environment variables define how exec parameters look (expecially with quotes)
The SUTAgent shall support at least the following commands:
- cd <dir>
- Change the current working directory to <dir>. <dir> can be absolute or relative to the cwd.
- cwd
- Print the current working directory.
- dirw <dir>
- Indicates whether a directory is writable or not. Prints the string "[<dir>] is writable" or "[<dir>] is not writable".
- exec <prog> [arg1] [arg2] [...]
- Executes <prog>, optionally passing one or more attributes, as a separate process. Prints out a platform-dependent message indicating success or failure.
- hash <file path>
- Prints an MD5 hash of the contents of <file path>, if found and readable.
- isdir <path>
- Prints "TRUE" if <path> is a directory, "FALSE" if it exists but isn't a directory, or an error string if <path> doesn't exist or isn't readable.
- ls [path]
- Prints the contents of [path], one entry per line. [path] defaults to cwd.
- mkdr <path>
- Creates <path> as a directory. If successful, prints the string "<path> successfully created". If failure, prints "Could not create directory <path>" as an error.
- ps
- Prints a process list, one process per line, in the form "<user id> <pid> <name>".
- pull <path> [offset] [length]
- Dumps [length] bytes of the contents of <path> starting at [offset] bytes. If not specified, [offset] defaults to 0 and [length] to the size of the file. The contents are preceeded by a line of the form <path>,<length>, regardless of whether <length> was specified. No trailing newline should be added if not present in the file.
- push <destination path> <length>
- Writes data to the remote file at <destination path>, creating it if required. This command should be followed by exactly <length> bytes of data, which are written, without translation, to the file. After closing the file, the SUTAgent prints out the MD5 hash of the contents of the file.
- quit
- Terminates the command connection.
- rebt [callback IP] [callback port]
- Reboots the device. If both callback IP and port are specified, the SUTAgent, when it comes back up after the reboot, will connect to that IP and port and send the same registration data as when it boots up.
- rm <file path>
- Removes the file at <file path>, which must be a regular file.
- rmdr <dir>
- Removes <dir> and all contents (i.e. recursive delete).
- testroot
- Prints the root test directory, that is, a writable location to be used for test support files.
- unzp <zip file> [dest dir]
- Unzips <zip file> to [dest dir]. [dest dir] defaults to cwd.