Skip to content

Commit

Permalink
Updated run?examples to support Windows executables.
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanoLusardi committed Aug 5, 2024
1 parent 70d90ee commit ebe8427
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 18 deletions.
39 changes: 22 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,27 +61,17 @@ This script configures, builds and installs the library.
python scripts/cmake.py <Debug|Release|DebWithRelInfo> <COMPILER_NAME> <COMPILER_VERSION>
```

## Install FFmpeg for Examples and Unit Tests

## Examples
Examples and Unit Tests execution requires video data generation. In order to generate such data it is required to install FFmpeg using your OS package manager such as:

```bash
# Build all the examples
python scripts/cmake.py <Debug|Release|RelWithDebInfo> <COMPILER_NAME> <COMPILER_VERSION> --examples --warnings

# Run all the examples
python3 scripts/tools/run_examples.py install/examples
```
Examples are installed in $PWD/install/examples.


## Unit Tests and Code Coverage

Unit tests execution requires video data generation. In order to generate such data it is required to install FFmpeg using your OS package manager such as:

```bash
# Windows
# Windows, using chocolatey
choco install ffmpeg -y

# Windows, using winget
winget install ffmpeg

# Linux
sudo apt-get install -y ffmpeg

Expand All @@ -92,9 +82,24 @@ brew install ffmpeg
Once FFmpeg is installed and available on the path run the following python script:

```bash
python3 scripts/tests/generate_test_data.py
python scripts/tests/generate_test_data.py
```


## Examples

```bash
# Build all the examples
python scripts/cmake.py <Debug|Release|RelWithDebInfo> <COMPILER_NAME> <COMPILER_VERSION> --examples --warnings

# Run all the examples
python scripts/tools/run_examples.py install/examples
```
Examples are installed in $PWD/install/examples.


## Unit Tests and Code Coverage

```bash
# Build Unit Tests with Code Coverage enabled (if supported)
python scripts/cmake.py <Debug|Release|RelWithDebInfo> <COMPILER_NAME> <COMPILER_VERSION> --coverage --warnings
Expand Down
2 changes: 1 addition & 1 deletion scripts/tools/run_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def examples(args):

examples_found = False
for example in examples_path.iterdir():
if example.is_file() and is_executable(example) and example.name in ["video_reader_simple_decode", "video_writer_simple_encode"]:
if example.is_file() and is_executable(example) and example.name.startswith(("video_reader_simple_decode", "video_writer_simple_encode")):
examples_found = True
print_example_name(example.name)
run(example)
Expand Down

0 comments on commit ebe8427

Please sign in to comment.