Skip to content
This repository has been archived by the owner on May 17, 2023. It is now read-only.

Commit

Permalink
[docs] Update 'Testing' section in CONTRIBUTING.md and tests/README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
aobolensk authored and Oleg Nabiullin committed Aug 31, 2020
1 parent 0aaed53 commit f069a9f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 44 deletions.
49 changes: 5 additions & 44 deletions CONTRIBUTING.md
Expand Up @@ -5,58 +5,19 @@ Please note that review and merge might take some time at this point.
Intel Media SDK is licensed under MIT license. By contributing to the project, you agree to the license and copyright terms therein and release your contribution under these terms.

Steps:
- Please follow guidelines (see doc/Coding_guidelines.md) in your code
- Please follow guidelines in your code (see [MSDK Coding Guide](./doc/Coding_guidelines.md))
- Validate that your changes don't break a build. See [build instruction](./README.md#how-to-build)
- Pass [testing](#testing)
- Wait while your patchset is reviewed and tested by our internal validation cycle

# Testing

## Requirements

Python* 3.5 is required to run tests. The following instruction assumes that Intel Media SDK cloned to `~/msdk` folder.

## How to test your changes

### 1. Rename system-wide Intel Media SDK libraries:

```sh
cd /opt/intel/mediasdk/lib64
# rename all libmfx*, for example:
sudo mv libmfxhw64.so libmfxhw64.so.default

cd /opt/intel/mediasdk/plugins/
# rename all plugins, for example:
sudo mv libmfx_hevcd_hw64.so libmfx_hevcd_hw64.so.default
sudo mv libmfx_h264la_hw64.so libmfx_h264la_hw64.so.default
sudo mv libmfx_hevce_hw64.so libmfx_hevce_hw64.so.default
sudo mv libmfx_vp8d_hw64.so libmfx_vp8d_hw64.so.default
```

### 2. Build original version of open-source Intel Media SDK and samples

```sh
cd ~/msdk
export MFX_HOME=`pwd`
perl tools/builder/build_mfx.pl --cmake=intel64.make.release
make -j8 -C __cmake/intel64.make.release
```

### 3. Collect gold results

```sh
cd ~/msdk/tests
python3.5 ted.py --gold
```

### 4. Apply changes to Intel Media SDK, commit them, and rebuild library and samples

### 5. Run tests once again to compare with gold results
1. Test Driver

```sh
python3.5 ted.py
```
Run test driver for any changes inside library and samples (see [Test Driver instruction](./tests/README.md#Test-driver))

All tests should pass. If not, you need to provide an explanation of why streams generated using the modified library are not bit-exact with the original ones.
1. Unit tests

### 6. Attach generated test_results.json to your pull request.
If you make changes in mfx_dispatch or tracer, you need to launch unit tests (see [Unit Tests instruction](./tests/README.md#Unit-tests))
11 changes: 11 additions & 0 deletions tests/README.md
Expand Up @@ -39,3 +39,14 @@ python3 ted.py
High level results in a form PASS/FAIL will be available in a console output.

Full logs will be available at `results` folder relative to ted.py location.

# Unit tests

Unit tests should be enabled and run as follows:
```console
mkdir build
cd build
cmake -DBUILD_TESTS=ON ..
make
make test
```

0 comments on commit f069a9f

Please sign in to comment.