Skip to content

Commit

Permalink
adds shellcheck test
Browse files Browse the repository at this point in the history
  • Loading branch information
wookietreiber committed Jul 16, 2018
1 parent 6126155 commit 1925232
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ test(
suite: ['style']
)

shellcheck = find_program('shellcheck.sh')
test(
'shellcheck', shellcheck,
env: ['MESON_SOURCE_ROOT=' + meson.source_root()],
suite: ['style']
)

lfs_check = find_program('lfs-check.sh')
test(
'lfs-check', lfs_check,
Expand Down
9 changes: 9 additions & 0 deletions test/shellcheck.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

if command -v shellcheck &> /dev/null ; then
cd "$MESON_SOURCE_ROOT" || exit 1
shellcheck test/*.sh
else
echo "no shellcheck, skipping test"
exit 77
fi

0 comments on commit 1925232

Please sign in to comment.