File: test.sh

package info (click to toggle)
pd-flext 0.6.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,960 kB
  • sloc: cpp: 12,978; makefile: 223; sh: 149
file content (27 lines) | stat: -rwxr-xr-x 699 bytes parent folder | download | duplicates (2)
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
#!/bin/bash

# This script tests the tutorial externals in gitlab CI

root="$1"
pd="${2:-pd}"
patches="${root}/tutorial/pd"
testpatch="${patches}/test.pd"
logfile="${patches}/test.log"

for f in ${root}/tutorial/?_*/*.pd_*; do
  p="${f%/*}"
  pp="${p##*_}"
  ext="${f##*/}"
  n="${ext%%.*}"
  ex="${patches}/ex-${pp}"
  echo Testing object $n with example patch $ex
  if ! [ -f ${ex}.pd ]; then
    echo Example patch $ex not found, testing mere object $n
    ex=$n
  fi
  if
    ! "$pd" -nort -noprefs -noaudio -nomidi -nogui -path "$p" -path "$patches" -open "$testpatch" -send "r obj $ex" -send "r del 100" -send "r quit 1000" &> "$logfile" || grep error "$logfile" 
  then
    exit -1
  fi
done