gvisor/test/runtimes
gVisor bot e07eacc99f Fix up test/runtimes/README.md.
In particular, explain how to push updates to the images.

PiperOrigin-RevId: 294508879
2020-02-11 13:38:45 -08:00
..
images Standardize on tools directory. 2020-01-27 12:21:00 -08:00
BUILD Standardize on tools directory. 2020-01-27 12:21:00 -08:00
README.md Fix up test/runtimes/README.md. 2020-02-11 13:38:45 -08:00
blacklist_go1.12.csv Add blacklists for remaining runtime tests, and test that they parse correctly. 2019-10-09 11:22:53 -07:00
blacklist_java11.csv Add blacklists for remaining runtime tests, and test that they parse correctly. 2019-10-09 11:22:53 -07:00
blacklist_nodejs12.4.0.csv Add blacklists for remaining runtime tests, and test that they parse correctly. 2019-10-09 11:22:53 -07:00
blacklist_php7.3.6.csv Add blacklists for remaining runtime tests, and test that they parse correctly. 2019-10-09 11:22:53 -07:00
blacklist_python3.7.3.csv Add blacklists for remaining runtime tests, and test that they parse correctly. 2019-10-09 11:22:53 -07:00
blacklist_test.go Add blacklists for remaining runtime tests, and test that they parse correctly. 2019-10-09 11:22:53 -07:00
build_defs.bzl Standardize on tools directory. 2020-01-27 12:21:00 -08:00
runner.go Reduce run time for //test/syscalls:socket_inet_loopback_test_runsc_ptrace. 2020-02-03 15:42:21 -08:00
runner.sh Shard the runtime tests. 2019-09-18 17:04:53 -07:00

README.md

Runtimes Tests Dockerfiles

The Dockerfiles defined under this path are configured to host the execution of the runtimes language tests. Each Dockerfile can support the language indicated by its directory.

The following runtimes are currently supported:

  • Go 1.12
  • Java 11
  • Node.js 12
  • PHP 7.3
  • Python 3.7

Building and pushing the images:

The canonical source of images is the gvisor-presubmit container registry. You can build new images with the following command:

$ cd images
$ docker build -f Dockerfile_$LANG [-t $NAME] .

To push them to our container registry, set the tag in the command above to gcr.io/gvisor-presubmit/$LANG, then push them. (Note that you will need appropriate permissions to the gvisor-presubmit GCP project.)

gcloud docker -- push gcr.io/gvisor-presubmit/$LANG

Running in Docker locally:

  1. Install and configure Docker

  2. Pull the image you want to run:

$ docker pull gcr.io/gvisor-presubmit/$LANG
  1. Run docker with the image.
$ docker run [--runtime=runsc] --rm -it $NAME [FLAG]

Running the command with no flags will cause all the available tests to execute.

Flags can be added for additional functionality:

  • --list: Print a list of all available tests
  • --test <name>: Run a single test from the list of available tests
  • --v: Print the language version