-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompat.sh
More file actions
54 lines (46 loc) · 1.21 KB
/
compat.sh
File metadata and controls
54 lines (46 loc) · 1.21 KB
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
set -e
run_test() {
local test_name=$1
local file_path=$2
echo "Function: ${test_name}, File: ${file_path}"
case ${test_name} in
"as-02-unwrap")
as-02-unwrap "${file_path}" > /dev/null
;;
"ffmpeg")
ffmpeg -loglevel error -i "${file_path}" -c copy -f null - > /dev/null
;;
"mxf2raw")
mxf2raw --log-level 2 "${file_path}" > /dev/null
;;
*)
echo "Unknown test: ${test_name}" >&2
return 1
;;
esac
}
# Define files to test along with the format:
# "/path/to/file|exclusion1,exclusion2,..."
FILES_TO_TEST=(
"/workspace/library/target/test-output/testVBE.mxf"
"/workspace/library/target/test-output/testCBE.mxf"
"/workspace/library/target/test-output/testClipVBE.mxf|ffmpeg,mxf2raw"
"/workspace/library/target/test-output/testPHDR.mxf"
)
for item in "${FILES_TO_TEST[@]}"; do
file="${item%%|*}"
exclusions=""
if [[ "$item" == *"|"* ]]; then
exclusions="${item#*|}"
fi
if [[ "$exclusions" != *"as-02"* ]]; then
run_test "as-02-unwrap" "${file}"
fi
if [[ "$exclusions" != *"ffmpeg"* ]]; then
run_test "ffmpeg" "${file}"
fi
if [[ "$exclusions" != *"mxf2raw"* ]]; then
run_test "mxf2raw" "${file}"
fi
done