File: test-installed

package info (click to toggle)
mussort 0.4-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 320 kB
  • sloc: perl: 6,012; makefile: 40; sh: 23
file content (35 lines) | stat: -rwxr-xr-x 835 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
31
32
33
34
35
#!/bin/sh
# autopkgtest check: Run simulated test data through mussort 
# Author: Sascha Steinbiss <sascha@steinbiss.name>
set -e

I=0

make_album () {
  for songno in `seq 1 $1`; do
    cp blank.mp3 in/$I.mp3
    id3v2 -a "$2" -t "$4, Song $songno" -A "$3" -c 'simulated test' -T $songno -y 2525 -g 23 in/$I.mp3
    I=$(expr $I + 1)
  done
}

ORIGDIR=$(pwd)
DATADIR=$ORIGDIR/debian/tests/
WORKDIR=$(mktemp -d)

trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
cd $WORKDIR

ffmpeg -ar 48000 -t 1 -f s16le -acodec pcm_s16le -ac 2 \
  -i /dev/zero -y -loglevel 8 \
  -acodec libmp3lame -aq 4 blank.mp3

mkdir in
make_album 10 "The Foo Bars" "Debut" "Baz"
make_album 23 "Swingin' Sources" "Upstream" "Lalaa"
make_album 5  "The Penguins" "A GNU Life" "Whatever"

mussort --no-cache in

find in -type f | sort | diff - $DATADIR/result.out