Community Packages

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#77948 - [bash-bats] parallel jobs option (-j) fails

Attached to Project: Community Packages
Opened by Yannick Langlois (ylan) - Wednesday, 22 March 2023, 12:42 GMT
Last edited by Toolybird (Toolybird) - Thursday, 23 March 2023, 03:47 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


Package: bash-bats 1.9.0-1

When using -j option to parallelize tests, this happens:
$ bats -j 2 tests.bats
/usr/lib/bats/bats-exec-suite: line 104: /usr/lib/bats-core/semaphore.bash: No such file or directory

Line 104 from the bats-exec-suite file
source "${BATS_ROOT}/lib/bats-core/semaphore.bash"

the bats-core directory is replaced by bats in the PKGBUILD file
sed -i 's|BATS_ROOT/lib/bats-core/|BATS_ROOT/lib/bats/|g' lib/bats-core/*

But fails to match ${BATS_ROOT} therefore the replacement is not done for this line.
This task depends upon

Closed by  Toolybird (Toolybird)
Thursday, 23 March 2023, 03:47 GMT
Reason for closing:  Duplicate
Additional comments about closing:  FS#74750
Comment by Yannick Langlois (ylan) - Wednesday, 22 March 2023, 18:44 GMT
Something like the following should do the trick:
sed -i -E 's|\{?BATS_ROOT\}?/lib/bats-core/|BATS_ROOT/lib/bats/|g' lib/bats-core/

And probably to apply to the 2 other sed commands.