-
Notifications
You must be signed in to change notification settings - Fork 440
Open
Labels
Component: Bash CodeEverything regarding the bash codeEverything regarding the bash codePriority: HighBroken behavior in specific environments like in parallel mode or only on some operating systemsBroken behavior in specific environments like in parallel mode or only on some operating systemsSize: LargeChanges across several filesChanges across several filesStatus: DuplicateType: Enhancement
Milestone
Description
It is quite often desired to run the same test logic in various scenarios. ATM there is no dedicated facility in bats to make that easy, so I resorted to placing test logic into a dedicated function and ugly copy/pasting for invocations with different parameters where I needed it
I am not yet sure what could be the "bats way" to specify parametric tests but since there is parsing and preparation of the test code is happening anyways could be something like
BACKEND=( docker singularity )
NJOBS=( 1 10 )
@test "description" BACKEND NJOBS {
echo "Here I am with backend=$backend njobs=$njobs"
...
}
and running it would result in 4 tests with adjusted descriptions:
description [backend=docker,njobs=1]
description [backend=docker,njobs=10]
description [backend=singularity,njobs=1]
description [backend=singularity,njobs=10]
and still subject to --filter
selection (so e.g. I could select only the ones for backend=docker
)
sdolenc, dimo414, ErnWong, hprem, lmrts and 8 more
Metadata
Metadata
Assignees
Labels
Component: Bash CodeEverything regarding the bash codeEverything regarding the bash codePriority: HighBroken behavior in specific environments like in parallel mode or only on some operating systemsBroken behavior in specific environments like in parallel mode or only on some operating systemsSize: LargeChanges across several filesChanges across several filesStatus: DuplicateType: Enhancement