Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

circle ci run-tests options 'use-parallel' and 'test-results-html' do not work #57

Open
adastar opened this issue Jan 18, 2024 · 1 comment
Labels

Comments

@adastar
Copy link

adastar commented Jan 18, 2024

I have the circle ci yml file:

version: 2.1
orbs:
matlab: mathworks/matlab@dev:v1-rc
jobs:
build:
# environment:
# MATHWORKS_RMC_BASE_URL: https://mw-ci-static-dev.s3.amazonaws.com/run-matlab-command/v2
# MATHWORKS_LICENSING_ENDPOINT: stage

machine:
  image: ubuntu-2204:2023.10.1
steps:
  - checkout
  - matlab/install:
      release: R2023b
  - matlab/run-command:
      command: magic(3)
  - matlab/run-tests:
      source-folder: code
      use-parallel: Yes
      test-results-html: results.html
  - matlab/run-build:
      tasks: clean mtest

The build finished without error. But in the test log, I do not see it starts parallel pool, I also do not see the results.html is generated. There is no log shows the option does not work either.

@davidbuzinski
Copy link
Member

Hi @adastar,

It looks like this issue was created in response to the following pipeline run:
https://app.circleci.com/pipelines/github/adastar/ci-sample-repo-bash/6/workflows/a6e09310-fc1e-4db7-8351-44084bde627c/jobs/5

If Parallel_Computing_Toolbox is not installed, the tests will run serially. Here is the relevant warning in the log that mentions this:

Warning: Unable to find a runInParallel method on matlab.unittest.TestRunner.
Running tests in serial instead.

It is near the top and might not be easily visible. We will consider ways to make this more apparent.

In addition, a test report was generated. It is on the filesystem of the runner. Here is the relevant output in the log that mentions this:

Generating test report. Please wait.
Preparing content for the test report.
Adding content to the test report.
Writing test report to file.
Test report has been saved to:
/home/circleci/project/results.html/index.html

If you would like to view test results in the job logs of your browser, you have to save them as job artifact. We will consider ways to document this better in the future.

You can add this to your job list after matlab/run-tests in order to store test results that are output in a folder results/index.html

      - store_test_results: 
          path: results/test-results.xml

Thanks,
David

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants