Skip to content

Octave tests: Address issue "Running MOLE Octave tests from user's computational platform #491" - #507

Open
cpaolini wants to merge 17 commits into
mainfrom
octave_tests
Open

cpaolini wants to merge 17 commits into
mainfrom
octave_tests

Conversation

@cpaolini

Copy link
Copy Markdown
Collaborator

What type of PR is this? (check all applicable)

  • Refactor
  • [ X ] Feature
  • Bug Fix
  • Optimization
  • Example
  • Documentation

Description

This feature adds a GNU Octave test suite for MOLE’s MATLAB/Octave operators, including gradient, divergence, Laplacian, boundary-condition, Poisson, curvilinear-grid, Jacobian, and TTM grid tests. Also adds README instructions describing GNU Octave installation and how to run the test suite.

Related Issues & Documents

QA Instructions, Screenshots, Recordings

Run the complete Octave test suite (run the tests from the tests/octave directory):

cd tests/octave
make run_octave_tests

Keep-open request

  • I am requesting maintainer review for keep-open.

Reason:

Added/updated tests?

_We encourage you to test all code included with MOLE, including examples.

  • [ X ] Yes
  • No, and this is why: please replace this line with details on why tests
    have not been included
  • I need help with writing tests

Read Contributing Guide and Code of Conduct

[optional] Are there any post deployment tasks we need to perform?

No.

@codecov

codecov Bot commented Oct 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Octave test failures do not propagate to Make or CI, and the existing CMake runner still sends converted Octave files to MATLAB.

3 open issues
What changed in this PR

This PR addresses #491 by enabling MOLE’s operator tests to run with GNU Octave without a MATLAB license, while preserving a separate MATLAB suite.

Changes:

  • Converts 14 test files to Octave’s built-in test format and preserves MATLAB versions under tests/matlab.
  • Adds an Octave Makefile runner and CI execution, and redirects MATLAB CI to the relocated tests.
  • Documents installation requirements and local test commands.
File Description
tests/​octave/​testTTMGrids.m Converts grid-generation checks to Octave tests.
tests/​octave/​testPoissonAccuracy.m Converts Poisson convergence checks.
tests/​octave/​testLapPolynomial.m Converts polynomial Laplacian checks.
tests/​octave/​testLaplacian.m Converts Laplacian nullity checks.
tests/​octave/​testGridOrientation3D.m Converts 3D orientation and degeneracy checks.
tests/​octave/​testGridOrientation.m Converts 2D orientation warning checks.
tests/​octave/​testGradPolynomial.m Converts polynomial gradient checks.
tests/​octave/​testGradient.m Converts gradient nullity checks.
tests/​octave/​testGI13Curv.m Converts interpolation and curvilinear regression checks.
tests/​octave/​testEnergy.m Converts energy eigenvalue checks.
tests/​octave/​testDivPolynomial.m Converts polynomial divergence checks.
tests/​octave/​testDivergence.m Converts divergence nullity checks.
tests/​octave/​testBCConsistency.m Converts boundary-condition consistency checks.
tests/​octave/​testAddScalarBC.m Converts scalar boundary-condition checks.
tests/​octave/​Makefile Adds a local Octave suite runner.
tests/​matlab/​testTTMGrids.m Preserves MATLAB grid-generation tests.
tests/​matlab/​testPoissonAccuracy.m Preserves MATLAB Poisson convergence tests.
tests/​matlab/​testLapPolynomial.m Preserves MATLAB polynomial Laplacian tests.
tests/​matlab/​testLaplacian.m Preserves MATLAB Laplacian nullity tests.
tests/​matlab/​testGridOrientation3D.m Preserves MATLAB 3D orientation tests.
tests/​matlab/​testGridOrientation.m Preserves MATLAB 2D orientation tests.
tests/​matlab/​testGradPolynomial.m Preserves MATLAB polynomial gradient tests.
tests/​matlab/​testGradient.m Preserves MATLAB gradient nullity tests.
tests/​matlab/​testGI13Curv.m Preserves MATLAB curvilinear regression tests.
tests/​matlab/​testEnergy.m Preserves MATLAB energy tests.
tests/​matlab/​testDivPolynomial.m Preserves MATLAB polynomial divergence tests.
tests/​matlab/​testDivergence.m Preserves MATLAB divergence nullity tests.
tests/​matlab/​testBCConsistency.m Preserves MATLAB boundary consistency tests.
tests/​matlab/​testAddScalarBC.m Preserves MATLAB scalar boundary tests.
tests/​matlab/​CMakeLists.txt Adds MATLAB test registration definitions.
README.md Documents Octave installation and test commands.
.github/​workflows/​matlab-tests.yml Redirects MATLAB tests and adds Octave execution.

Review effort: Balanced

Comment on lines +13 to +16
COMMAND matlab
-nojvm
-batch
"addpath('${CMAKE_CURRENT_SOURCE_DIR}'); addpath('${CMAKE_SOURCE_DIR}/src/octave'); assertSuccess(runtests('${TEST_NAME}'))"
- name: Run Octave tests
run: |
cd tests/octave
octave --quiet --eval "oruntests('.')"
Comment thread tests/octave/Makefile
testLapPolynomial \
testPoissonAccuracy \
testTTMGrids; do \
octave --quiet --eval "addpath(pwd()); test('$$test_name')" || exit 1; \

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Running MOLE Octave tests from user's computational platform

2 participants