History

Merge pull request #1171 from shihuade/ReleaseV2.2

update binary comparison test script

dongzha committed 12 years ago

Commit 396249f2 parents cd026ef c1a9bee3 files · +73 −35Browse files

Unified · Split

3 files
  1. .travis.yml +6 −7
  2. run_Test.sh +66 −28
  3. test/encoder_binary_comparison/.gitignore +1 −0
.travis.yml+6−7
@@ -20,19 +20,18 @@ before_script: · 19 unmodified lines
2020
2121 env:
2222 - TASK=UnitTest; TestParameter=""
23− - TASK=BinaryCompare; TestParameter=BA_MW_D.264;
24− - TASK=BinaryCompare; TestParameter=LS_SVA_D.264;
25− - TASK=BinaryCompare; TestParameter=CVPCMNL1_SVA_C.264;
23+ - TASK=BinaryCompare; TestParameter=BA_MW_D.264
24+ - TASK=BinaryCompare; TestParameter=LS_SVA_D.264
25+ - TASK=BinaryCompare; TestParameter=CVPCMNL1_SVA_C.264
2626
2727 matrix:
2828 exclude:
2929 - compiler: clang
30− env: TASK=BinaryCompare; TestParameter=BA_MW_D.264;
30+ env: TASK=BinaryCompare; TestParameter=BA_MW_D.264
3131 - compiler: clang
32− env: TASK=BinaryCompare; TestParameter=LS_SVA_D.264;
32+ env: TASK=BinaryCompare; TestParameter=LS_SVA_D.264
3333 - compiler: clang
34− env: TASK=BinaryCompare; TestParameter=CVPCMNL1_SVA_C.264;
35−
34+ env: TASK=BinaryCompare; TestParameter=CVPCMNL1_SVA_C.264
3635 script:
3736 - echo "currrent test is for ${TASK}"
3837 - echo "test parameter is ${TestParameter}"
run_Test.sh+66−28
@@ -1,9 +1,24 @@
1−
21 #!/bin/bash
3−
4−
5−#usage:runMain ${TestType} ${TestBitStream}
6−runMain()
2+#**********************************************************************************
3+# This script is for test on travis.Currently there are 5 jobs running on
4+# travis in parallel status which are listed as below:
5+# 1.Unit test with gcc compiler;
6+# 2.Unit test with clang compiler;
7+# 3.Binary comparison test for test bit stream A;
8+# 4.Binary comparison test for test bit stream B;
9+# 5.Binary comparison test for test bit stream C.
10+# For binary comparison test,before running all test cases, it need to prepare
11+# the test space.On travis,as those parallel jobs are running on different VMs,
12+# so each job need to prepare for its test space for itself.
13+#
14+# --usage:
15+# ./runTest.sh UnitTest
16+# or ./runTest.sh BinaryCompare ${TestBitStreamName}
17+#
18+# date: 10/06/2014 Created
19+#**********************************************************************************
20+#usage: runInputParamCheck ${TestType} ${TestBitStream}
21+runInputParamCheck()
722 {
823 local ParameterFlag=""
924 if [ $# -eq 1 -a "$1" = "UnitTest" ]
@@ -15,41 +30,64 @@ runMain() · 5 unmodified lines
1530 else
1631 let "ParameterFlag=1"
1732 fi
18−
19− if [ ! ${ParameterFlag} -eq 0 ]
33+ return ${ParameterFlag}
34+}
35+#usage: runUnitTest
36+runUnitTest()
37+{
38+ make -B ENABLE64BIT=Yes BUILDTYPE=Release all plugin test
39+ make -B ENABLE64BIT=Yes BUILDTYPE=Debug all plugin test
40+ make -B ENABLE64BIT=No BUILDTYPE=Release all plugin test
41+ make -B ENABLE64BIT=No BUILDTYPE=Debug all plugin test
42+ return $?
43+}
44+#usage: runPrepareAndBinaryTest $TestBitStream
45+runPrepareAndBinaryTest()
46+{
47+ if [ ! $# -eq 1 ]
2048 then
21− echo "usage: runMain UnitTest "
22− echo " or runMain BinaryCompare \${TestBitStreamName} "
49+ echo "usage: runPrepareAndBinaryTest \$TestBitStream"
2350 exit 1
2451 fi
25−
26−
52+ local TestBitStream=$1
53+ local WorkingDir=`pwd`
54+ local BinaryTestDir="test/encoder_binary_comparison"
55+ local TestSpacePrepareLog="AllTestSpacePrepare.log"
56+ cd ${BinaryTestDir}
57+ ./run_PrepareAllTestData.sh 64 2>${TestSpacePrepareLog}
58+ cd ${WorkingDir}
59+ echo ""
60+ echo " binary compare test, test bit stream is ${TestBitStream}"
61+ echo ""
62+ ./test/encoder_binary_comparison/run_OneBitStream.sh ${TestBitStream}
63+ return $?
64+}
65+#usage:runMain ${TestType} ${TestBitStream}
66+runMain()
67+{
2768 local TestType=$1
2869 local TestBitStream=$2
29−
70+ runInputParamCheck ${TestType} ${TestBitStream}
71+ if [ ! $? -eq 0 ]
72+ then
73+ echo "usage: ./runTest.sh UnitTest \${PrepareFlag}"
74+ echo " or ./runTest.sh BinaryCompare \${TestBitStreamName} \${PrepareFlag} "
75+ exit 1
76+ fi
3077 if [ "${TestType}" = "UnitTest" ]
3178 then
3279 set -e
33− make -B ENABLE64BIT=Yes BUILDTYPE=Release all plugin test
34− make -B ENABLE64BIT=Yes BUILDTYPE=Debug all plugin test
35− make -B ENABLE64BIT=No BUILDTYPE=Release all plugin test
36− make -B ENABLE64BIT=No BUILDTYPE=Debug all plugin test
37− elif [ "${TestType}" = "BinaryCompare" ]
80+ runUnitTest
81+ return $?
82+ fi
83+ if [ "${TestType}" = "BinaryCompare" ]
3884 then
39− echo ""
40− echo " binary compare test, test bit stream is ${TestBitStream}"
41− echo ""
42− ./test/encoder_binary_comparison/run_OneBitStream.sh ${TestBitStream}
85+ set -e
86+ runPrepareAndBinaryTest ${TestBitStream}
87+ return $?
4388 fi
44−
4589 }
46−
4790 TestType=$1
4891 TestBitStream=$2
49−
5092 runMain ${TestType} ${TestBitStream}
5193
52−
53−
54−
55−
test/encoder_binary_comparison/.gitignore+1−0
@@ -2,3 +2,4 @@ AllTestData · 1 unmodified line
22 Codec
33 FinalResult
44 build.log
5+AllTestSpacePrepare.log

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t