Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test related documentation issues #10168

Merged
merged 1 commit into from
Nov 15, 2023
Merged

Conversation

staffik
Copy link
Contributor

@staffik staffik commented Nov 14, 2023

Summary:

  • Update Runner Test Results URL.
  • Fix cargo nextest command for running cross_shard_txtest target.
  • Update outdated / not working links in the documentation.

python_tests.md file already has a guidance about cargo build command for local test runs.
Feature guards are test-specific. Depending on what test do we want to run, we should modify the script below accordingly.

Compiling the client for tests

The local tests by default expect the binary to be in the default location for a
debug build ({nearcore}/target/debug). Some tests might also expect
test-specific features guarded by a feature flag to be available. To compile the
binary with such features run:

cargo build -p neard --features=adversarial

@staffik staffik requested a review from a team as a code owner November 14, 2023 11:43
@staffik staffik requested a review from wacban November 14, 2023 11:43
See the `Test infrastructure` section below for details.

Expensive and python tests are not part of CI, and are run by a custom nightly
runner. The results of the latest runs are available
[here](http://nightly.neartest.com/). Today, test runs launch approximately
[here](https://nayduck.near.org/#/). Today, test runs launch approximately
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue 1: Incorrect URL for Runner Test Results

@@ -36,19 +36,18 @@ It requires nextest harness which can be installed by running `cargo install car
such tests is to enable all the features by passing `--all-features` to
`cargo nextest run`, e.g:

`cargo nextest run --package near-client --test cross_shard_tx
tests::test_cross_shard_tx --all-features`
`cargo nextest run --package near-client -E 'test(=tests::cross_shard_tx::test_cross_shard_tx)' --all-features`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue 2: Non-Existent Test Target Documentation

@@ -63,7 +63,7 @@ want to run tests against a release build, you can create a file with the
following config:

```json
{"local": True, "near_root": "../target/release/"}
{"local": true, "near_root": "../target/release/"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue 3: Misguiding Python Tests Documentation

@walnut-the-cat
Copy link
Contributor

Feature guards are test-specific. Depending on what test do we want to run, we should modify the script below accordingly

Should we add some tip in python_tests.md to remind people regarding this?

@staffik
Copy link
Contributor Author

staffik commented Nov 15, 2023

@walnut-the-cat

Feature guards are test-specific. Depending on what test do we want to run, we should modify the script below accordingly

Should we add some tip in python_tests.md to remind people regarding this?

I think we do not need to add it as it is already there (but in other words):

Some tests might also expect
test-specific features guarded by a feature flag to be available. To compile the
binary with such features run:

cargo build -p neard --features=adversarial

Copy link
Contributor

@wacban wacban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@staffik staffik added this pull request to the merge queue Nov 15, 2023
Merged via the queue into master with commit 2b3ba91 Nov 15, 2023
17 of 18 checks passed
@staffik staffik deleted the hacken-report-issues-fixes branch November 15, 2023 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants