Skip to content

Commit

Permalink
Add JSBSim integration test (only for FDMv24 for now)
Browse files Browse the repository at this point in the history
  • Loading branch information
julianneswinoga committed Dec 6, 2022
1 parent 25bf3fc commit 988ca66
Show file tree
Hide file tree
Showing 11 changed files with 493 additions and 21 deletions.
12 changes: 12 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@ jobs:
- run:
name: Poetry show version
command: poetry --version
- when:
# 3.10 has a problem with numpy 1.19.5, from JSBSim
# This hack can be removed when 3.6 support is dropped
condition:
equal: [ "3.10", << parameters.python-version >> ]
steps:
- run:
name: Remove JSBSim
command: poetry remove --dev JSBSim
- run:
name: Delete JSBSim tests
command: rm --verbose tests/test_*JSBSim*.py
- run:
name: Poetry build
command: poetry build --no-ansi --no-interaction
Expand Down
109 changes: 92 additions & 17 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ pytest-cov = "^3.0.0"
pytest = "==7.0.1"
GitPython = "==3.1.20"
pytest-mock = "==3.6.1"
JSBSim = "==1.1.11"

[tool.poetry.urls]
"Repository" = "https://github.com/julianneswinoga/flightgear-python"
Expand Down
14 changes: 10 additions & 4 deletions scripts/run_tests.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
#!/bin/bash
set -e

python3.6 -m venv --clear .venv
if [ "$1" = 'clean' ]; then
python3.6 -m venv --clear .venv
fi

. ./.venv/bin/activate
pip3 install -U pip
pip3 install -U poetry
poetry update

if [ "$1" = 'clean' ]; then
pip3 install -U pip
pip3 install -U poetry
poetry update
fi
poetry build
poetry install
pytest --cov-report term-missing:skip-covered --cov=flightgear_python tests/
Loading

0 comments on commit 988ca66

Please sign in to comment.