Skip to content

Commit

Permalink
Create SwitchExecutiveExample VD before running system tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ni-jfitzger committed Apr 19, 2024
1 parent d5c1e9a commit 41bc4cb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions build/templates/tox-system_tests.ini.mako
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ ignore_basepython_conflict=True
toxworkdir = ../../../.tox

[testenv]
% if module_name == 'nise':
allowlist_externals =
C:\Program Files (x86)\National Instruments\Switch Executive\SwitchExecutive.exe

% endif
description =
% if uses_other_wheel:
${wheel_env_no_py}: Build the ${other_wheel} wheel because we use it in ${module_name} tests
Expand All @@ -51,6 +56,10 @@ commands =
% if uses_other_wheel:
${wheel_env_no_py}: python -m build --wheel

% endif
% if module_name == 'nise':
# Create SwitchExecutiveExample Virtual Device, if it's missing. This device is used by the tests.
nise-system_tests: "C:\Program Files (x86)\National Instruments\Switch Executive\SwitchExecutive.exe" s
% endif
# --disable-pip-version-check prevents pip from telling us we need to upgrade pip, since we are doing that now
${module_name}-system_tests: python -m pip install --disable-pip-version-check --upgrade pip
Expand Down
5 changes: 5 additions & 0 deletions generated/nise/tox-system_tests.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ ignore_basepython_conflict=True
toxworkdir = ../../../.tox

[testenv]
allowlist_externals =
C:\Program Files (x86)\National Instruments\Switch Executive\SwitchExecutive.exe

description =
nise-system_tests: Run nise system tests (requires NI Switch Executive runtime to be installed)
nise-coverage: Prepare coverage report for upload to codecov.io # upload handled by GitHub Actions
Expand All @@ -19,6 +22,8 @@ changedir =
nise-coverage: .

commands =
# Create SwitchExecutiveExample Virtual Device, if it's missing. This device is used by the tests.
nise-system_tests: "C:\Program Files (x86)\National Instruments\Switch Executive\SwitchExecutive.exe" s
# --disable-pip-version-check prevents pip from telling us we need to upgrade pip, since we are doing that now
nise-system_tests: python -m pip install --disable-pip-version-check --upgrade pip
nise-system_tests: python -c "import nise; nise.print_diagnostic_information()"
Expand Down

0 comments on commit 41bc4cb

Please sign in to comment.