Skip to content

Commit 0b1cb86

Browse files
README: use --workdir in the docker examples
Clean up and standardize our examples by always mounting the crate in /crate and using --workdir to avoid `cd ..` in the container. While we're here, let's remove a strange mount of ~/.ssh in the last example. Signed-off-by: Stefano Garzarella <[email protected]>
1 parent a5d88d4 commit 0b1cb86

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

README.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -243,17 +243,16 @@ The line coverage is saved in [tests/coverage](tests/coverage). To update the
243243
coverage before submitting a PR, run the coverage test:
244244

245245
```bash
246-
CRATE="kvm-ioctls"
246+
cd path/to/kvm-ioctls
247247
# NOTE: `latest` should point to the latest version, but you can specify an exact
248248
# one as we do with CONTAINER_VERSION in .buildkite/autogenerate_pipeline.py file.
249249
TAG="latest"
250250
docker pull rustvmm/dev:${TAG}
251251
docker run --device=/dev/kvm \
252252
-it \
253253
--security-opt seccomp=unconfined \
254-
--volume $(pwd)/${CRATE}:/${CRATE} \
254+
--volume $(pwd):/crate --workdir /crate \
255255
rustvmm/dev:${TAG}
256-
cd ${crate}
257256
pytest --profile=devel rust-vmm-ci/integration_tests/test_coverage.py
258257
```
259258

@@ -331,16 +330,16 @@ pipeline output. In its present form, the test cannot fail.
331330
To run the test locally:
332331

333332
```bash
333+
cd path/to/vm-superio
334334
# NOTE: `latest` should point to the latest version, but you can specify an exact
335335
# one as we do with CONTAINER_VERSION in .buildkite/autogenerate_pipeline.py file.
336336
TAG="latest"
337337
docker pull rustvmm/dev:${TAG}
338338
docker run --device=/dev/kvm \
339339
-it \
340340
--security-opt seccomp=unconfined \
341-
--volume $(pwd)/${CRATE}:/${CRATE} \
341+
--volume $(pwd):/crate --workdir /crate \
342342
rustvmm/dev:${TAG}
343-
cd ${CRATE}
344343
pytest rust-vmm-ci/integration_tests/test_benchmark.py -s
345344
```
346345

@@ -354,18 +353,15 @@ You can find the latest container version in the
354353
[script](.buildkite/autogenerate_pipeline.py)
355354
that autogenerates the pipeline. For example:
356355
```bash
357-
cd ~/vm-superio
358-
CRATE="vm-superio"
356+
cd path/to/vm-superio
359357
# NOTE: `latest` should point to the latest version, but you can specify an exact
360358
# one as we do with CONTAINER_VERSION in .buildkite/autogenerate_pipeline.py file.
361359
TAG="latest"
362360
docker pull rustvmm/dev:${TAG}
363361
docker run -it \
364362
--security-opt seccomp=unconfined \
365-
--volume $(pwd):/${CRATE} \
366-
--volume ~/.ssh:/root/.ssh \
363+
--volume $(pwd):/crate --workdir /crate \
367364
rustvmm/dev:${TAG}
368-
cd vm-superio
369365
./rust-vmm-ci/test_run.py
370366
```
371367

0 commit comments

Comments
 (0)