Closed jotaen4tinypilot closed 5 months ago
@jdeanwallace sorry for the PR/review flood… I’m not blocked by any of them, so no pressure from my side, especially if you want to play around a bit with bats.
👀 @jotaen4tinypilot it's your turn, please take a look
Resolves https://github.com/tiny-pilot/tinypilot/issues/1714. Related https://github.com/tiny-pilot/tinypilot/issues/1710. Stacked onto https://github.com/tiny-pilot/tinypilot/pull/1720.
This PR sets up bash tests with bats, and adds a first test suite for the
strip-marker-sections
script.Notes
.bats
test file next to the script under test. The directive in.dockerignore
removes it from the bundle /.deb
file.build_bash
dev script is called “build” for consistency withbuild_python
andbuild_javascript
, even though we technically don’t build something. I’ve created https://github.com/tiny-pilot/tinypilot/issues/1716 for us to potentially reconsider this overall.build_bash
, it somehow felt reasonable to me to search all places that are likely to contain.bats
files, even though we currently only have them in/opt/tinypilot-privileged/scripts/
. I don’t feel strongly about this, though./bin/bash
, so it fails to execute any of our bash scripts that have a#!/bin/bash
shebang (which is effectively all of them). We instead would either have to change all our shebangs to the (most portable)#!/usr/bin/env bash
shebang, or we just install bats manually like done here (in the Circle conf).