https://pantsbuild.org/ logo
#general
Title
# general
r

refined-addition-53644

04/07/2022, 1:29 PM
Hi, what would be a way to hook-up say a bash script which runs some tests to pants so that these tests are also run when I run
./pants test ::
? We are trying to hook up a tool called
dbt
which basically supports running some tests for transformations defined using sql/ninja.
dbt
has CLI support but not yet mature python support.
1
e

enough-analyst-54434

04/07/2022, 1:34 PM
Maybe try: https://www.pantsbuild.org/docs/reference-shunit2_test Even though you're not testing bash scripts here with shunit2 tests, which is the "normal" use case afaict, it seems like a reasonable use.
👍 1
h

hundreds-father-404

04/07/2022, 4:33 PM
SHunit2 is not super frequently used, so feedback is definitely appreciated on the experience, such as if docs can be improved
b

brash-baker-91190

04/08/2022, 2:11 PM
FWIW, I use SHunit2 through Pants all the time... it's been such a game-changer
❤️ 2
🙌 1
At some point, I want to figure out how to wire up code coverage for Bash, but other than that, no issues at all.
👖 2
h

hundreds-father-404

04/08/2022, 2:33 PM
Oh that is awesome to hear! Our shell integration is probably my favorite feature of pants, even though it's pretty niche - it attests to the vision we have of making builds a joy and accessible, even for things like shell scripts
b

brash-baker-91190

04/08/2022, 3:59 PM
I write a shockingly large amount of Bash code; Pants basically makes that tolerable (dare I say "fun"? 🤔) with the SHunit, shellcheck, and shfmt integrations. It's a one-stop-shop of awesome.
❤️ 1
🤩 1
h

hundreds-father-404

04/08/2022, 4:02 PM
Yay! Would you be willing to let us tweet that? either with or without attribution?
b

brash-baker-91190

04/08/2022, 4:05 PM
@hundreds-father-404 Sure, go ahead 😄 I don't have an active Twitter account, so don't worry about attribution.
❤️ 1
b

busy-vase-39202

04/08/2022, 4:44 PM
Thank you @brash-baker-91190!
👍 1
2 Views