File: coverage

package info (click to toggle)
lua-cliargs 3.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 388 kB
  • sloc: sh: 118; javascript: 14; makefile: 5
file content (30 lines) | stat: -rwxr-xr-x 600 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash

# Run busted and collect spec coverage using LuaCov.
# Output will be found at /luacov.report.out.
#
# Usage:
#
#   $ ./bin/coverage
#   $ cat luacov.report.out

which luacov &> /dev/null

if [ $? -ne 0 ]; then
  echo "You must have luacov installed."
  echo "Run 'luarocks install luacov' then try again".
  exit 1
fi

which busted &> /dev/null

if [ $? -ne 0 ]; then
  echo "You must have luacov installed."
  echo "Run 'luarocks install busted' then try again".
  exit 1
fi

busted -c
luacov src/
rm luacov.stats.out
grep -zPo "(?s)={10,}\nSummary\n={10,}.+" luacov.report.out