You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Where to put project tests, cabal-testsuite/ProjectTests? #9798
I've been adding tests of projects to cabal-testsuite/PackageTests where all other cabal-testsuite tests are. Can I start adding project tests (and moving some misplaced ones) to cabal-testsuite/ProjectTests?
I always thought about it as a “this is where golden tests go” folder. Do we gain something by dividing it in two? If there is a build command test for a package and one for a package in the context of a project, do they go one in PackageTests and the other in ProjectTests?
The package tests often depend on project files, so I think the line between a package test and a project test is rather blurry... I'm not sure if separating them will gain us any clarity and will introduce another decision one has to make before they start writing a test (friction).
I worked through the project reference seeing which project settings are in cabal-testsuite projects (assuming they're named *.project). Most settings from the reference aren't found in these projects. For some, there's an equivalent test using the setting's command option equivalent, such as with-compiler: being tested with the --with-compiler command line option.
Activity
ffaf1 commentedon Mar 11, 2024
I always thought about it as a “this is where golden tests go” folder. Do we gain something by dividing it in two? If there is a build command test for a package and one for a package in the context of a project, do they go one in
PackageTestsand the other inProjectTests?philderbeast commentedon Mar 11, 2024
Yes we see how few (or how many) project tests we have.
alt-romes commentedon Mar 11, 2024
The package tests often depend on project files, so I think the line between a package test and a project test is rather blurry... I'm not sure if separating them will gain us any clarity and will introduce another decision one has to make before they start writing a test (friction).
philderbeast commentedon Mar 11, 2024
I'm suggesting moving only the project-specific tests (imports and the like), not tests with a project, not tests with a
cabal.projectas simple as:cabal/cabal-testsuite/PackageTests/NewConfigure/ConfigFile/cabal.project
Line 1 in 74b1f21
alt-romes commentedon Mar 12, 2024
I suppose that is more reasonable, but the test you linked also contains a Cabal package, how do you tell it is a project test?
philderbeast commentedon Mar 12, 2024
We had 3 projects in
cabal-testsuitewithimport: ...6 weeks ago.I've added a few more recently.
philderbeast commentedon Mar 12, 2024
I worked through the project reference seeing which project settings are in
cabal-testsuiteprojects (assuming they're named*.project). Most settings from the reference aren't found in these projects. For some, there's an equivalent test using the setting's command option equivalent, such aswith-compiler:being tested with the--with-compilercommand line option.philderbeast commentedon Mar 12, 2024
Here's all the
*.projectprojects: