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 seek_stress test papercut #880

Merged
merged 2 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,23 @@ rav1d is currently experimental. Core functionality has been transpiled using [c

Currently we use the original Meson test suite for testing the Rust port. To setup and run these tests, do the following:

First, build the Rust project using Cargo. You'll need to do this step manually before running any tests because it is not built automatically when tests are run. Note that you need to build with the `--release` flag, as tests are run against the release binary.
First, build the Rust project using Cargo. You'll need to do this step manually before running any tests because it is not built automatically when tests are run. Note that we build with the `--release` flag, adjust paths accordingly
for debug or cross-target builds.

```txt
cargo build --release
```

Then create the `build` dir and run `meson setup` in it:
Second, create the `build` dir with `meson`:

```txt
mkdir build
cd build
meson setup ..
meson setup build
```

Then you can run `meson test` to run the tests. Currently only the `testdata-*` suites are setup to test against the Rust executable:
Then you can run the tests with:

```txt
meson test \
--suite testdata-8 \
--suite testdata-10 \
--suite testdata-12 \
--suite testdata-multi
.github/workflows/test.sh -r target/release/dav1d
```

You can learn more about how to build and test in the `.github/workflows` folder.
9 changes: 5 additions & 4 deletions tests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,16 @@ if get_option('enable_tools')
endif

if get_option('test_rust')
# options to test with out-of-tree versions of dav1d and seek_stress
test_rust_path = get_option('test_rust_path')
seek_stress_test_rust_path = get_option('seek_stress_test_rust_path')

# We're trying to test the Rust build, override the `dav1d` and
# `seek_stress` executables to point to the versions given during setup.
# Adjust relative paths so one can use binary paths relative to project
# top dir rather than relative to the location of the test subdirectory.
if test_rust_path != ''
# Adjust relative paths so one can use binary paths relative to project
# top dir rather than relative to the location of the test subdirectory.
dav1d = files(join_paths('../', get_option('test_rust_path')))
endif
if seek_stress_test_rust_path != ''
seek_stress = files(join_paths('../', get_option('seek_stress_test_rust_path')))
endif
endif
Expand Down
Loading