Skip to content

Set test options via cabal.project - #4039

Merged
michaelpj merged 8 commits into
masterfrom
mpj/project-test-options
Feb 3, 2024
Merged

Set test options via cabal.project#4039
michaelpj merged 8 commits into
masterfrom
mpj/project-test-options

Conversation

@michaelpj

@michaelpj michaelpj commented Feb 3, 2024

Copy link
Copy Markdown
Collaborator

This means we can set the default properly for people using the project, and also set things more simply in the test workflow.

The option setting in hls-test-options also seemed to be simply not working, for reasons I don't fully understand (but it seems like NumThreads is a special option.

This means we can set the default properly for people using the project,
and also set things more simply in the test workflow.
@michaelpj
michaelpj requested a review from fendor as a code owner February 3, 2024 12:17

@fendor fendor left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

Comment thread .github/workflows/test.yml Outdated
Comment thread .github/workflows/test.yml Outdated
# same package.
run: |
echo "TEST_OPTS=-j1 --rerun-update --rerun-filter failures,exceptions,new" >> $GITHUB_ENV
echo 'cabal configure --test-options="--rerun-update --rerun-filter failures,exceptions,new"' >> cabal.project.local

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I mean this, which has the side effect of writing those options into cabal.project.local

Suggested change
echo 'cabal configure --test-options="--rerun-update --rerun-filter failures,exceptions,new"' >> cabal.project.local
cabal configure --test-options="--rerun-update --rerun-filter failures,exceptions,new"
$ cabal configure --test-options="--rerun-update --rerun-filter failures,exceptions,new"
$ cat cabal.project.local 
ignore-project: False
test-options: "--rerun-update"
              "--rerun-filter"
              "failures,exceptions,new"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

That's what I meant to type, just 🤦

@michaelpj
michaelpj merged commit da337bc into master Feb 3, 2024
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.

3 participants