mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
deploy-ng: Add files to build application out of the unit tests
This will be a good way to make sure everything in the tests work under a frozen environment. NOTE: The application builds and runs, but no tests are collected. We still need to figure out how we want to handle tests. Freeze them all and modify test collection? Add py/test files to the build directory and try to run them?
This commit is contained in:
parent
fcb1d9308b
commit
33fd302a8e
13
tests/main.py
Normal file
13
tests/main.py
Normal file
@ -0,0 +1,13 @@
|
||||
import _pytest
|
||||
if not hasattr(_pytest, '__file__'):
|
||||
import os
|
||||
import _pytest._pluggy
|
||||
import py
|
||||
|
||||
_pytest.__file__ = os.getcwd()
|
||||
_pytest._pluggy.__file__ = os.getcwd()
|
||||
py.__file__ = os.getcwd()
|
||||
|
||||
import pytest
|
||||
|
||||
pytest.main()
|
3
tests/requirements.txt
Normal file
3
tests/requirements.txt
Normal file
@ -0,0 +1,3 @@
|
||||
pytest
|
||||
--pre --extra-index-url https://archive.panda3d.org/branches/deploy-ng
|
||||
panda3d
|
33
tests/setup.py
Normal file
33
tests/setup.py
Normal file
@ -0,0 +1,33 @@
|
||||
from setuptools import setup
|
||||
import pytest
|
||||
|
||||
setup(
|
||||
name="panda3d-tester",
|
||||
options = {
|
||||
'build_apps': {
|
||||
'gui_apps': {
|
||||
'tester': 'main.py',
|
||||
},
|
||||
'plugins': [
|
||||
'pandagl',
|
||||
'p3openal_audio',
|
||||
],
|
||||
'include_modules': {
|
||||
'*': [
|
||||
'pkg_resources.*.*',
|
||||
# TODO why does the above not get these modules too?
|
||||
'pkg_resources._vendor.packaging.*',
|
||||
'pkg_resources._vendor.packaging.version',
|
||||
'pkg_resources._vendor.packaging.specifiers',
|
||||
'pkg_resources._vendor.packaging.requirements',
|
||||
] + pytest.freeze_includes(),
|
||||
},
|
||||
'deploy_platforms': [
|
||||
'manylinux1_x86_64',
|
||||
'macosx_10_6_x86_64',
|
||||
'win32',
|
||||
'win_amd64',
|
||||
],
|
||||
}
|
||||
}
|
||||
)
|
Loading…
x
Reference in New Issue
Block a user