Skip to content

Commit

Permalink
pytest: document new NayDuck features (#5294)
Browse files Browse the repository at this point in the history
Co-authored-by: Bowen Wang <[email protected]>
  • Loading branch information
mina86 and bowenwang1996 authored Nov 18, 2021
1 parent 9264f44 commit 9abe40f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
11 changes: 6 additions & 5 deletions nightly/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,13 @@ As mentioned, there are additional arguments that can go between the
test category and the test specification arguments. Those are
`--timeout`, `--release` and `--remote`.

`--timeout=<timeout>` which specifies the timeout in seconds after
which the test will be stopped. If not given the default timeout is
180 seconds (i.e. three minutes). For example, the following
increases timeout for a test to four minutes:
`--timeout=<timeout>` which specifies the time after which the test
will be stopped and considered failed. `<timeout>` is an integer with
an optional `s`, `m` or `h` suffix. If no suffix is given, `s` is
assumed. The default timeout is three minutes. For example, the
following increases timeout for a test to four minutes:

pytest --timeout=240 sanity/restaked.py
pytest --timeout=4m sanity/restaked.py

`--release` makes the build use a release profile rather than a dev
profile. In other words, all `cargo` invocations are passed
Expand Down
9 changes: 6 additions & 3 deletions pytest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,13 @@ scheduled with `--release` flag) just as if they were executed on
local machine. Similarly, freshly built NEAR test contracts will be
located in `../runtime/near-test-contracts/res` directory.

The `NAYDUCK` and `NIGHTLY_RUNNER` environment variables are set when
tests are run on NayDuck. If all else fails they can be used to
The `NAYDUCK=1`, `NIGHTLY_RUNNER=1` and `NAYDUCK_TIMEOUT=<timeout>`
environment variables are set when tests are run on NayDuck. If
necessary and no other option exists, the first two can be used to
change test’s behaviour to accommodate it running on the testing
infrastructure as opposed to local machine.
infrastructure as opposed to local machine. Meanwhile,
`NAYDUCK_TIMEOUT` specifies how much time in seconds test has to run
before NayDuck decides the test failed.

### Code Style

Expand Down

0 comments on commit 9abe40f

Please sign in to comment.