File: testall

package info (click to toggle)
ruby-otr-activerecord 2.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 356 kB
  • sloc: ruby: 561; sh: 133; makefile: 6
file content (38 lines) | stat: -rwxr-xr-x 681 bytes parent folder | download
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
31
32
33
34
35
36
37
38
#!/usr/bin/env bash

#
# Run every combination:
#   bin/testall
#
# Run just the matching combinations:
#   bin/testall ruby-3.0
#

set -euo pipefail

cd $(dirname $0)/../
source bin/lib.sh

[[ $# -gt 0 ]] && filter=("$@") || filter=()

# flatten matrix
matrix=()
while read ruby ar dbs; do
  for db in $dbs; do
    matrix+=("$ruby $ar $db")
  done
done < <(awk '/^ *[^#]/' test/matrix)

# run each row in the matrix
for row in "${matrix[@]}"; do
  read ruby ar db <<< "$row"
  if [[ ${#filter[@]} -eq 0 ]] || array_in_array ${#filter[@]} ${filter[@]} $ruby $ar $db; then
    cmd="bin/test  $ruby  $ar  $db"
    announce "$cmd"
    sleep 1
    $cmd
  fi
done

podpose stop
nyancat