blob: e582f7e288db13c838835f0c2c0018020ef3647f [file] [log] [blame]
shihuade78771342014-07-08 13:15:57 -04001
2#!/bin/bash
3
4
5#usage:runMain ${TestType} ${TestBitStream}
6runMain()
7{
8 local ParameterFlag=""
9 if [ $# -eq 1 -a "$1" = "UnitTest" ]
10 then
11 let "ParameterFlag=0"
12 elif [ $# -eq 2 -a "$1" = "BinaryCompare" ]
13 then
14 let "ParameterFlag=0"
15 else
16 let "ParameterFlag=1"
17 fi
18
19 if [ ! ${ParameterFlag} -eq 0 ]
20 then
21 echo "usage: runMain UnitTest "
22 echo " or runMain BinaryCompare \${TestBitStreamName} "
23 exit 1
24 fi
25
26
27 local TestType=$1
28 local TestBitStream=$2
29
30 if [ "${TestType}" = "UnitTest" ]
31 then
Martin Storsjödb476ba2014-07-11 12:31:19 +030032 set -e
shihuade78771342014-07-08 13:15:57 -040033 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" ]
38 then
39 echo ""
40 echo " binary compare test, test bit stream is ${TestBitStream}"
41 echo ""
42 ./test/encoder_binary_comparison/run_OneBitStream.sh ${TestBitStream}
43 fi
44
45}
46
47TestType=$1
48TestBitStream=$2
49
50runMain ${TestType} ${TestBitStream}
51
52
53
54
55