-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #779 from g-maxime/mkv-blockadditions
Add fields compare in policy checker
- Loading branch information
Showing
30 changed files
with
1,759 additions
and
667 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/bash | ||
|
||
PATH_SCRIPT=$(dirname "${0}") | ||
. "${PATH_SCRIPT}/utils.sh" | ||
|
||
FILES_DIRECTORY="${PATH_SCRIPT}/SampleFiles/PolicyTestFiles" | ||
|
||
MC="${PWD}/mediaconch" | ||
|
||
RCODE=0 | ||
|
||
while read LINE ; do | ||
POLICY="$(echo "${LINE}" | cut -d':' -f1)" | ||
FILE="$(echo "${LINE}" | cut -d':' -f2)" | ||
OUTCOME="$(echo "${LINE}" | cut -d':' -f3)" | ||
TEST="${POLICY}:$(basename "${FILE}"):${OUTCOME}" | ||
|
||
if [ ! -e "${FILES_DIRECTORY}/Policy/${POLICY}" ] ; then | ||
echo "NOK: ${TEST}/${POLICY}, file not found" >&9 | ||
RCODE=1 | ||
continue | ||
fi | ||
|
||
if [ ! -e "${FILES_DIRECTORY}/${FILE}" ] ; then | ||
echo "NOK: ${TEST}/${FILE}, file not found" >&9 | ||
RCODE=1 | ||
continue | ||
fi | ||
|
||
pushd "${FILES_DIRECTORY}" >/dev/null 2>&1 | ||
DATA="$(${MC} -p Policy/${POLICY} -fx ${FILE})" | ||
|
||
T1=`echo "${DATA}" | xmllint --xpath \ | ||
"string(/*[local-name()='MediaConch']/*[local-name()='media']/*[local-name()='policy']/@outcome)" -` | ||
|
||
if [ "${T1}" == "${OUTCOME}" ] ; then | ||
echo "OK: ${TEST}" >&9 | ||
else | ||
echo "NOK: ${TEST}, failed" >&9 | ||
RCODE=1 | ||
fi | ||
popd >/dev/null 2>&1 | ||
done < "${PATH_SCRIPT}/test_policy.txt" | ||
|
||
exit ${RCODE} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
value.xml:Matroska/videofirst.mkv:pass | ||
value.xml:Matroska/audiofirst.mkv:fail | ||
info.xml:Matroska/audiofirst.mkv:info | ||
warn.xml:Matroska/audiofirst.mkv:warn | ||
levelcap.xml:Matroska/audiofirst.mkv:info | ||
operators.xml:Matroska/videofirst.mkv:pass | ||
mmt.xml:Matroska/videofirst.mkv:pass |
Oops, something went wrong.