Skip to content

Commit

Permalink
Greatly simplify the wheel testing
Browse files Browse the repository at this point in the history
  • Loading branch information
JCGoran committed Feb 18, 2024
1 parent a54c558 commit db9054e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
19 changes: 3 additions & 16 deletions packaging/test_wheel.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,6 @@
# A simple set of tests checking if a wheel is working correctly
set -xe

test_wheel () {
# the path to the root directory
rootdir="$1"
# sample mod file for nrnivmodl check
test_dir="$(mktemp -d)"
cp "${rootdir}"/nmodl/ext/example/*.mod "${test_dir}"
cp "${rootdir}/test/integration/mod/cabpump.mod" "${rootdir}/test/integration/mod/var_init.inc" "${test_dir}"
for mod in "${test_dir}"/*.mod
do
nmodl "$mod" sympy --analytic
done
python -c "import nmodl; driver = nmodl.NmodlDriver(); driver.parse_file('${test_dir}/hh.mod')"
}

# run tests
test_wheel "$@"
find "$1/test/" "$1/nmodl/ext/" \
-name "*.mod" \
-exec python -c "import nmodl; driver = nmodl.NmodlDriver(); driver.parse_file('{}')" \;
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ NMODL_BUILD_WHEEL = "ON"
[tool.setuptools_scm]

[tool.cibuildwheel]
test-command = "pytest {package}/test/unit/pybind"
test-command = [
"pytest {package}/test/unit/pybind",
"bash {package}/packaging/test_wheel.bash {package}",
]
test-extras = ["test"]

[tool.cibuildwheel.macos]
Expand Down

0 comments on commit db9054e

Please sign in to comment.