File: test_frameset

package info (click to toggle)
ffmpegfs 2.17-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 17,624 kB
  • sloc: cpp: 20,946; sh: 4,825; ansic: 333; makefile: 232; php: 53
file content (54 lines) | stat: -rwxr-xr-x 1,421 bytes parent folder | download | duplicates (3)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash

ADDOPT=""

. "${BASH_SOURCE%/*}/funcs.sh" "$1"

check_filesize_frameset() {
	if [ "${FILEEXT}" == "png" ];
	then
                check_filesize "${1}" 38625 139606 "${TMPPATH}" 1
	elif [ "${FILEEXT}" == "jpg" ];
	then
                check_filesize "${1}" 26286 70679 "${TMPPATH}" 1
	elif [ "${FILEEXT}" == "bmp" ];
	then
                check_filesize "${1}" 7372854 7372854 "${TMPPATH}" 1
	fi
}

# Should be 250 files for 250 frames in source
FILES=250

echo "Checking number of files is ${FILES}"
[ $(ls "${DIRNAME}"/frame_test_pal.mp4/ -1 | wc -l) = ${FILES} ]
echo "Number of files OK"

echo "Checking access with full name"
for i in 000204 000004 000104 000207 000007 000107
do
	FILE="${DIRNAME}"/frame_test_pal.mp4/${i}.${FILEEXT}
        printf "> %s -> " ${FILE##*/}
        cp -vpf "${FILE}" "${TMPPATH}" > /dev/null
        #cp -vpf "${FILE}" "${TMPPATH}" > /dev/null
	check_filesize_frameset "${i}"
done

echo "Checking access with regular expression"
for i in 00024[4-79] 00008[4-79] 00018[4-79]
do
        echo ">> Expression ${i}.*"
        for FILE in "${DIRNAME}"/frame_test_pal.mp4/${i}.*
	do
		FILENAME="${FILE##*/}"
                printf "> %s -> " ${FILE##*/}
                cp -vpf "${FILE}" "${TMPPATH}" > /dev/null
                #cp -vpf "${FILE}" "${TMPPATH}" > /dev/null
		check_filesize_frameset "${FILENAME%.*}"
	done 2>/dev/null
done
echo "Access OK"

echo "Pass"

echo "OK"