Skip to content
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
27 changes: 25 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
cd $GITHUB_WORKSPACE
mkdir openxilenv-build
cd openxilenv-build
cmake -G Ninja -DCMAKE_INSTALL_PREFIX=$HOME/tools/OpenXilEnv ../openxilenv
cmake -G Ninja -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/tools/OpenXilEnv ../openxilenv

- name: Build OpenXilEnv
run: |
Expand All @@ -83,11 +83,22 @@ jobs:
cd $GITHUB_WORKSPACE/openxilenv-build
cmake --install .

- name: Test OpenXilEnv installation
run: |
cd $GITHUB_WORKSPACE/openxilenv
export OPENXILENV_INSTALLATION_PATH=$GITHUB_WORKSPACE/tools/OpenXilEnv
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install -r ./requirements.txt
python3 -m pip install ./python-api
pytest -vv

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: OpenXilEnv-Linux-Qt6_4_2
path: ~/tools/OpenXilEnv/**
path: ${{ github.workspace }}/tools/OpenXilEnv/**

windows-build:
runs-on: windows-latest
Expand Down Expand Up @@ -163,6 +174,18 @@ jobs:
cd D:\a\tools\OpenXilEnv
windeployqt.exe XilEnvGui.exe

- name: Test OpenXilEnv installation
shell: pwsh
run: |
cd D:\a\openxilenv\openxilenv\openxilenv
$env:OPENXILENV_INSTALLATION_PATH = "D:\a\tools\OpenXilEnv"
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install -r ./requirements.txt
python -m pip install ./python-api
pytest -vv

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
Expand Down
33 changes: 33 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,39 @@ If not, use **LinuxRemoteMaster.out**.

Ensure **RemoteStartServer** is installed and running on the Linux PC to allow remote execution.

## Python API

OpenXilEnv is distributed with a python bindings wrapper that allows full control over a runninx openXilEnv instance via python.

The [functional tests](test/functional/) of openXilEnv are implemented in [pytest](https://docs.pytest.org/en/stable/) using the openXilEnv **python API** and provide an example usage.

For a detailed description take a look at the [openXilenv python API refrence](docs/PYTHON_API_REFERENCE.md).

## Test

OpenXilEnv provides functionality tests, that validate the **openXilEnv** installation using pytest.

The tests depend on the **openXilEnv Installation** path and the **openXilEnv Source** path.
To make sure the paths are available, set the following variables

on windows
```cmd
set OPENXILENV_INSTALLATION_PATH="%SystemDrive%\dev\tools"
set OPENXILENV_SOURCE_PATH="%SystemDrive%\dev\src"
```

on linux
```bash
export OPENXILENV_SOURCE_PATH="$HOME/dev/src/openXilEnv"
export OPENXILENV_INSTALLATION_PATH="$HOME/dev/tools/openXilEnv"
```

To run all tests, simply execute

```bash
pytest -vv
```

## License
This project is part of the Eclipse Foundation and licensed under the [Apache License 2.0](LICENSE.txt).

Expand Down
Loading