Skip to content

Commit

Permalink
Update docs for running doctests locally
Browse files Browse the repository at this point in the history
  • Loading branch information
peace-maker committed Feb 14, 2024
1 parent 9e4b11a commit c049837
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
5 changes: 3 additions & 2 deletions travis/docker/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
ROOT = $(shell git rev-parse --show-toplevel)
$(shell reset)

all: doctest3

Dockerfile: FORCE
cp $(ROOT)/extra/docker/develop/Dockerfile Dockerfile
cat Dockerfile.travis >> Dockerfile
cp $(ROOT)/extra/docker/develop/10-import.py 10-import.py
cp $(ROOT)/extra/docker/develop/ipython_config.py ipython_config.py

all: doctest3

shell bash: image
@echo Running interactive shell
Expand All @@ -30,4 +31,4 @@ image: Dockerfile
docker build -t travis .

FORCE:
.PHONY: all image doctest bash
.PHONY: all image doctest2 doctest3 bash
16 changes: 14 additions & 2 deletions travis/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,19 @@ It's pretty simple, just run `make`. All of your changes will be copied into th

```shell
$ make -C travis/docker ANDROID=yes
$ make -C travis/docker ANDROID=no TARGET=docs/source/tubes/ssh.rst
$ make -C travis/docker ANDROID=no TARGET=ssh.rst
```

By default the Python 3 tests are run. You can choose the Python version using the `doctest2` or `doctest3` target.

```shell
$ make -C travis/docker ANDROID=no doctest2
```

You can get drop into a tmux session in the container to debug tests using the `shell` or `bash` targets.

```shell
$ make -C travis/docker shell
```

## Options
Expand All @@ -19,7 +31,7 @@ Controls whether or not to run the Android test. The valid options are ``yes``

### `TARGET`

This is appended to the `sphinx` command line, but generally is useful to sepcify a specific `rst` file to parse (e.g. to only run those tests).
This is appended to the `sphinx` command line, but generally is useful to select a specific `rst` file to parse (e.g. to only run those tests).

## Known Issues

Expand Down
2 changes: 1 addition & 1 deletion travis/docker/tmux.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/env zsh
exec tmux -u -2 -CC
exec tmux -u -2

0 comments on commit c049837

Please sign in to comment.