You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+92-41Lines changed: 92 additions & 41 deletions
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ To build from source code, runtime-tools requires Go 1.7.x or above.
8
8
[`oci-runtime-tool generate`][generate.1] generates [configuration JSON][config.json] for an [OCI bundle][bundle].
9
9
[OCI-compatible runtimes][runtime-spec] like [runC][] expect to read the configuration from `config.json`.
10
10
11
-
```sh
11
+
```console
12
12
$ oci-runtime-tool generate --output config.json
13
13
$ cat config.json
14
14
{
@@ -22,63 +22,114 @@ $ cat config.json
22
22
[`oci-runtime-tool validate`][validate.1] validates an OCI bundle.
23
23
The error message will be printed if the OCI bundle failed the validation procedure.
24
24
25
-
```sh
25
+
```console
26
26
$ oci-runtime-tool generate
27
27
$ oci-runtime-tool validate
28
28
INFO[0000] Bundle validation succeeded.
29
29
```
30
30
31
31
## Testing OCI runtimes
32
32
33
-
```sh
33
+
The runtime validation suite uses [`prove`][prove], which is packaged for most distributions (for example, it is in [Debian's `perl` package][debian-perl] and [Gentoo's `dev-lang/perl` package][gentoo-perl]).
34
+
If you cannot install `prove`, you can probably run the test suite with another [TAP consumer][tap-consumers], although you'll have to edit the [`Makefile`](Makefile) to replace `prove`.
35
+
36
+
```console
37
+
$ make runtimetest validation-executables
34
38
$ sudo make RUNTIME=runc localvalidation
35
-
RUNTIME=runc go test -tags "" -v github.com/opencontainers/runtime-tools/validation
If you are confident that the `validation/*.t` are current, you can run `prove` (or your preferred TAP consumer) directly to avoid unnecessary rebuilds:
{"", false, specerror.NewError(specerror.CreateWithBundlePathAndID, fmt.Errorf("create MUST generate an error if the ID is not provided"), rspecs.Version)},
44
+
{containerID, true, specerror.NewError(specerror.CreateNewContainer, fmt.Errorf("create MUST create a new container"), rspecs.Version)},
45
+
{containerID, false, specerror.NewError(specerror.CreateWithUniqueID, fmt.Errorf("create MUST generate an error if the ID provided is not unique"), rspecs.Version)},
0 commit comments