From f069a9f18dbb3b3d8fb1c7277d6df52a4fc1cbdc Mon Sep 17 00:00:00 2001 From: Arseniy Obolenskiy Date: Thu, 13 Aug 2020 16:51:46 +0300 Subject: [PATCH] [docs] Update 'Testing' section in CONTRIBUTING.md and tests/README.md --- CONTRIBUTING.md | 49 +++++-------------------------------------------- tests/README.md | 11 +++++++++++ 2 files changed, 16 insertions(+), 44 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index aa2adac031..676dbf6bc8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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)) diff --git a/tests/README.md b/tests/README.md index b7edb18aaa..3d58171d3f 100644 --- a/tests/README.md +++ b/tests/README.md @@ -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 +```