package tezt

  1. Overview
  2. Docs

Module Runner.SysSource

Extension to Stdlib.Sys that can also execute on remote runners.

Most functions from this module just call their Stdlib.Sys equivalent when runner is not specified. When runner is specified, they instead use SSH to execute a shell command remotely with a similar effect.

Sourcetype error

Errors that can occur when executing a Sys command on a remote runner.

Sourceexception Remote_error of error

Exception raised when failing to execute a Sys command remotely.

This is not raised when running a command without a runner. Instead, Sys_error is raised.

Sourceval show_error : error -> string

Convert an error to an error message.

Sourceval file_exists : ?runner:t -> string -> bool

Check if a file exists on the system.

For the local version, see Sys.file_exists.

Sourceval mkdir : ?runner:t -> ?perms:int -> string -> unit

Create a new directory.

For the local version, see Unix.mkdir.

Sourceval is_directory : ?runner:t -> string -> bool

Check if a file exists and is a directory.

For the local version, see Sys.is_directory.

Sourceval readdir : ?runner:t -> string -> string array

Return the contents of a directory.

For the local version, see Sys.readdir.

Sourceval remove : ?runner:t -> string -> unit

Remove a file.

For the local version, see Sys.remove.

Sourceval rm_rf : t -> string -> unit

Remove recursively with rm -rf.

Only implemented for remote runners.

Sourceval rmdir : ?runner:t -> string -> unit

Remove a directory.

For the local version, see Unix.rmdir.

Sourceval mkfifo : ?runner:t -> ?perms:int -> string -> unit

Create a named pipe.

For the local version, see Unix.mkfifo.

OCaml

Innovation. Community. Security.