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
I added an ls $BATS_TEST_DIRNAME to my test case before the run and noticed:
All the test files are present
There's a binary called "scripts" (name after the filegroup)
None of the .sh files I expect are present
If I change deps = [ ":scripts" ], to data = [ ":scripts" ], the files are once more available and it passes. It's a bit surprising for a change in the patch version but maybe we were using it wrong before. Any recommendation here?
Should it work when using deps to bring in multiple scripts?
Should we bring in the scripts we want to test with using data rather than deps? (it feels wierd to bring executable scripts as data)
The text was updated successfully, but these errors were encountered:
I think you might need to use sh_library instead of filegroup for the target :scripts.
deps is supposed to be used to declare executable deps, but the dep target itself must be executable. While I think it is confusing that the old version used to work for you with deps = [ ...], its current behavior is correct strictly speaking.
This is because data is supposed to declare non-executable files and filegroups, while deps declares executable files, such as libraries.
In the case of scripts, the difference is of course purely academic, since all files are interpreted. But strictly speaking, the use of data or filegroup for executable deps is incorrect.
I tried to run the new version (everything runs fine on 0.32.0) but all the tests are now failing with some version of
I tested 0.33.0 initially but it seems to happen in 0.32.1 already, my guess is it is related to #26
Our tests are mostly structured like this:
The build file looks like:
I added an
ls $BATS_TEST_DIRNAME
to my test case before the run and noticed:.sh
files I expect are presentIf I change
deps = [ ":scripts" ],
todata = [ ":scripts" ],
the files are once more available and it passes. It's a bit surprising for a change in the patch version but maybe we were using it wrong before. Any recommendation here?deps
to bring in multiple scripts?data
rather thandeps
? (it feels wierd to bring executable scripts as data)The text was updated successfully, but these errors were encountered: