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
20 20
21env:21env:
22 - TASK=UnitTest; TestParameter=""22 - TASK=UnitTest; TestParameter=""
23 - TASK=BinaryCompare; TestParameter=BA_MW_D.264;23 - TASK=BinaryCompare; TestParameter=BA_MW_D.264
24 - TASK=BinaryCompare; TestParameter=LS_SVA_D.264;24 - TASK=BinaryCompare; TestParameter=LS_SVA_D.264
25 - TASK=BinaryCompare; TestParameter=CVPCMNL1_SVA_C.264;25 - TASK=BinaryCompare; TestParameter=CVPCMNL1_SVA_C.264
26 26
27matrix:27matrix:
28 exclude:28 exclude:
29 - compiler: clang29 - compiler: clang
30 env: TASK=BinaryCompare; TestParameter=BA_MW_D.264;30 env: TASK=BinaryCompare; TestParameter=BA_MW_D.264
31 - compiler: clang31 - compiler: clang
32 env: TASK=BinaryCompare; TestParameter=LS_SVA_D.264;32 env: TASK=BinaryCompare; TestParameter=LS_SVA_D.264
33 - compiler: clang33 - compiler: clang
34 env: TASK=BinaryCompare; TestParameter=CVPCMNL1_SVA_C.264;34 env: TASK=BinaryCompare; TestParameter=CVPCMNL1_SVA_C.264
35
36script:35script:
37 - echo "currrent test is for ${TASK}"36 - echo "currrent test is for ${TASK}"
38 - echo "test parameter is ${TestParameter}"37 - echo "test parameter is ${TestParameter}"
run_Test.sh+66−28
@@ -1,9 +1,24 @@
1
2#!/bin/bash1#!/bin/bash
3 2#**********************************************************************************
4 3# This script is for test on travis.Currently there are 5 jobs running on
5#usage:runMain ${TestType} ${TestBitStream}4# travis in parallel status which are listed as below:
6runMain()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}
21runInputParamCheck()
7{22{
8 local ParameterFlag=""23 local ParameterFlag=""
9 if [ $# -eq 1 -a "$1" = "UnitTest" ]24 if [ $# -eq 1 -a "$1" = "UnitTest" ]
@@ -15,41 +30,64 @@ runMain() · 5 unmodified lines
15 else30 else
16 let "ParameterFlag=1"31 let "ParameterFlag=1"
17 fi32 fi
18 33 return ${ParameterFlag}
19 if [ ! ${ParameterFlag} -eq 0 ]34}
35#usage: runUnitTest
36runUnitTest()
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
45runPrepareAndBinaryTest()
46{
47 if [ ! $# -eq 1 ]
20 then48 then
21 echo "usage: runMain UnitTest "49 echo "usage: runPrepareAndBinaryTest \$TestBitStream"
22 echo " or runMain BinaryCompare \${TestBitStreamName} "
23 exit 150 exit 1
24 fi51 fi
25 52 local TestBitStream=$1
26 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}
66runMain()
67{
27 local TestType=$168 local TestType=$1
28 local TestBitStream=$269 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
30 if [ "${TestType}" = "UnitTest" ]77 if [ "${TestType}" = "UnitTest" ]
31 then78 then
32 set -e79 set -e
33 make -B ENABLE64BIT=Yes BUILDTYPE=Release all plugin test80 runUnitTest
34 make -B ENABLE64BIT=Yes BUILDTYPE=Debug all plugin test81 return $?
35 make -B ENABLE64BIT=No BUILDTYPE=Release all plugin test82 fi
36 make -B ENABLE64BIT=No BUILDTYPE=Debug all plugin test83 if [ "${TestType}" = "BinaryCompare" ]
37 elif [ "${TestType}" = "BinaryCompare" ]
38 then84 then
39 echo ""85 set -e
40 echo " binary compare test, test bit stream is ${TestBitStream}"86 runPrepareAndBinaryTest ${TestBitStream}
41 echo ""87 return $?
42 ./test/encoder_binary_comparison/run_OneBitStream.sh ${TestBitStream}
43 fi88 fi
44
45}89}
46
47TestType=$190TestType=$1
48TestBitStream=$291TestBitStream=$2
49
50runMain ${TestType} ${TestBitStream}92runMain ${TestType} ${TestBitStream}
51 93
52
53
54
55
test/encoder_binary_comparison/.gitignore+1−0
@@ -2,3 +2,4 @@ AllTestData · 1 unmodified line
2Codec2Codec
3FinalResult3FinalResult
4build.log4build.log
5AllTestSpacePrepare.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