Merge pull request #1171 from shihuade/ReleaseV2.2
update binary comparison test script
This commit is contained in:
commit
396249fedc
13
.travis.yml
13
.travis.yml
@ -20,19 +20,18 @@ before_script:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
- TASK=UnitTest; TestParameter=""
|
- TASK=UnitTest; TestParameter=""
|
||||||
- TASK=BinaryCompare; TestParameter=BA_MW_D.264;
|
- TASK=BinaryCompare; TestParameter=BA_MW_D.264
|
||||||
- TASK=BinaryCompare; TestParameter=LS_SVA_D.264;
|
- TASK=BinaryCompare; TestParameter=LS_SVA_D.264
|
||||||
- TASK=BinaryCompare; TestParameter=CVPCMNL1_SVA_C.264;
|
- TASK=BinaryCompare; TestParameter=CVPCMNL1_SVA_C.264
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
exclude:
|
exclude:
|
||||||
- compiler: clang
|
- compiler: clang
|
||||||
env: TASK=BinaryCompare; TestParameter=BA_MW_D.264;
|
env: TASK=BinaryCompare; TestParameter=BA_MW_D.264
|
||||||
- compiler: clang
|
- compiler: clang
|
||||||
env: TASK=BinaryCompare; TestParameter=LS_SVA_D.264;
|
env: TASK=BinaryCompare; TestParameter=LS_SVA_D.264
|
||||||
- compiler: clang
|
- compiler: clang
|
||||||
env: TASK=BinaryCompare; TestParameter=CVPCMNL1_SVA_C.264;
|
env: TASK=BinaryCompare; TestParameter=CVPCMNL1_SVA_C.264
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- echo "currrent test is for ${TASK}"
|
- echo "currrent test is for ${TASK}"
|
||||||
- echo "test parameter is ${TestParameter}"
|
- echo "test parameter is ${TestParameter}"
|
||||||
|
96
run_Test.sh
96
run_Test.sh
@ -1,9 +1,24 @@
|
|||||||
|
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
#**********************************************************************************
|
||||||
|
# This script is for test on travis.Currently there are 5 jobs running on
|
||||||
#usage:runMain ${TestType} ${TestBitStream}
|
# travis in parallel status which are listed as below:
|
||||||
runMain()
|
# 1.Unit test with gcc compiler;
|
||||||
|
# 2.Unit test with clang compiler;
|
||||||
|
# 3.Binary comparison test for test bit stream A;
|
||||||
|
# 4.Binary comparison test for test bit stream B;
|
||||||
|
# 5.Binary comparison test for test bit stream C.
|
||||||
|
# For binary comparison test,before running all test cases, it need to prepare
|
||||||
|
# the test space.On travis,as those parallel jobs are running on different VMs,
|
||||||
|
# so each job need to prepare for its test space for itself.
|
||||||
|
#
|
||||||
|
# --usage:
|
||||||
|
# ./runTest.sh UnitTest
|
||||||
|
# or ./runTest.sh BinaryCompare ${TestBitStreamName}
|
||||||
|
#
|
||||||
|
# date: 10/06/2014 Created
|
||||||
|
#**********************************************************************************
|
||||||
|
#usage: runInputParamCheck ${TestType} ${TestBitStream}
|
||||||
|
runInputParamCheck()
|
||||||
{
|
{
|
||||||
local ParameterFlag=""
|
local ParameterFlag=""
|
||||||
if [ $# -eq 1 -a "$1" = "UnitTest" ]
|
if [ $# -eq 1 -a "$1" = "UnitTest" ]
|
||||||
@ -15,41 +30,64 @@ runMain()
|
|||||||
else
|
else
|
||||||
let "ParameterFlag=1"
|
let "ParameterFlag=1"
|
||||||
fi
|
fi
|
||||||
|
return ${ParameterFlag}
|
||||||
if [ ! ${ParameterFlag} -eq 0 ]
|
}
|
||||||
|
#usage: runUnitTest
|
||||||
|
runUnitTest()
|
||||||
|
{
|
||||||
|
make -B ENABLE64BIT=Yes BUILDTYPE=Release all plugin test
|
||||||
|
make -B ENABLE64BIT=Yes BUILDTYPE=Debug all plugin test
|
||||||
|
make -B ENABLE64BIT=No BUILDTYPE=Release all plugin test
|
||||||
|
make -B ENABLE64BIT=No BUILDTYPE=Debug all plugin test
|
||||||
|
return $?
|
||||||
|
}
|
||||||
|
#usage: runPrepareAndBinaryTest $TestBitStream
|
||||||
|
runPrepareAndBinaryTest()
|
||||||
|
{
|
||||||
|
if [ ! $# -eq 1 ]
|
||||||
then
|
then
|
||||||
echo "usage: runMain UnitTest "
|
echo "usage: runPrepareAndBinaryTest \$TestBitStream"
|
||||||
echo " or runMain BinaryCompare \${TestBitStreamName} "
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
local TestBitStream=$1
|
||||||
|
local WorkingDir=`pwd`
|
||||||
|
local BinaryTestDir="test/encoder_binary_comparison"
|
||||||
|
local TestSpacePrepareLog="AllTestSpacePrepare.log"
|
||||||
|
cd ${BinaryTestDir}
|
||||||
|
./run_PrepareAllTestData.sh 64 2>${TestSpacePrepareLog}
|
||||||
|
cd ${WorkingDir}
|
||||||
|
echo ""
|
||||||
|
echo " binary compare test, test bit stream is ${TestBitStream}"
|
||||||
|
echo ""
|
||||||
|
./test/encoder_binary_comparison/run_OneBitStream.sh ${TestBitStream}
|
||||||
|
return $?
|
||||||
|
}
|
||||||
|
#usage:runMain ${TestType} ${TestBitStream}
|
||||||
|
runMain()
|
||||||
|
{
|
||||||
local TestType=$1
|
local TestType=$1
|
||||||
local TestBitStream=$2
|
local TestBitStream=$2
|
||||||
|
runInputParamCheck ${TestType} ${TestBitStream}
|
||||||
|
if [ ! $? -eq 0 ]
|
||||||
|
then
|
||||||
|
echo "usage: ./runTest.sh UnitTest \${PrepareFlag}"
|
||||||
|
echo " or ./runTest.sh BinaryCompare \${TestBitStreamName} \${PrepareFlag} "
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
if [ "${TestType}" = "UnitTest" ]
|
if [ "${TestType}" = "UnitTest" ]
|
||||||
then
|
then
|
||||||
set -e
|
set -e
|
||||||
make -B ENABLE64BIT=Yes BUILDTYPE=Release all plugin test
|
runUnitTest
|
||||||
make -B ENABLE64BIT=Yes BUILDTYPE=Debug all plugin test
|
return $?
|
||||||
make -B ENABLE64BIT=No BUILDTYPE=Release all plugin test
|
fi
|
||||||
make -B ENABLE64BIT=No BUILDTYPE=Debug all plugin test
|
if [ "${TestType}" = "BinaryCompare" ]
|
||||||
elif [ "${TestType}" = "BinaryCompare" ]
|
then
|
||||||
then
|
set -e
|
||||||
echo ""
|
runPrepareAndBinaryTest ${TestBitStream}
|
||||||
echo " binary compare test, test bit stream is ${TestBitStream}"
|
return $?
|
||||||
echo ""
|
|
||||||
./test/encoder_binary_comparison/run_OneBitStream.sh ${TestBitStream}
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TestType=$1
|
TestType=$1
|
||||||
TestBitStream=$2
|
TestBitStream=$2
|
||||||
|
|
||||||
runMain ${TestType} ${TestBitStream}
|
runMain ${TestType} ${TestBitStream}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1
test/encoder_binary_comparison/.gitignore
vendored
1
test/encoder_binary_comparison/.gitignore
vendored
@ -2,3 +2,4 @@ AllTestData
|
|||||||
Codec
|
Codec
|
||||||
FinalResult
|
FinalResult
|
||||||
build.log
|
build.log
|
||||||
|
AllTestSpacePrepare.log
|
||||||
|
Loading…
x
Reference in New Issue
Block a user