forked from shihuade/Conformance-Test-Openh264
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_CleanUpTestSpace.sh
executable file
·89 lines (72 loc) · 1.67 KB
/
run_CleanUpTestSpace.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!/bin/bash
#***************************************************************************************
# brief:
# --clean up all files generated by previous test.
# --usage: run_CleanUpTestSpace.sh
#
#
#date: 6/09/2015 Created
#***************************************************************************************
runUsage()
{
echo ""
echo -e "\033[32m usage: run_CleanUpTestSpace.sh \033[0m"
echo ""
echo -e "\033[32m clean up all files generated by previous test. \033[0m"
echo ""
}
runRemovedPreviousTestData()
{
git clean -fdx
if [ -d $AllTestDataFolder ]
then
./${ScriptFolder}/run_SafeDelete.sh $AllTestDataFolder
fi
if [ -d $SHA1TableFolder ]
then
./${ScriptFolder}/run_SafeDelete.sh $SHA1TableFolder
fi
if [ -d $FinalResultDir ]
then
./${ScriptFolder}/run_SafeDelete.sh $FinalResultDir
fi
if [ -d $ReportDir ]
then
./${ScriptFolder}/run_SafeDelete.sh $ReportDir
fi
if [ -d $SourceFolder ]
then
./${ScriptFolder}/run_SafeDelete.sh $SourceFolder
fi
for file in ${CurrentDir}/*.log
do
./${ScriptFolder}/run_SafeDelete.sh ${file}
done
for file in ${CurrentDir}/*.txt
do
./${ScriptFolder}/run_SafeDelete.sh ${file}
done
for file in ${CurrentDir}/*.flag
do
./${ScriptFolder}/run_SafeDelete.sh ${file}
done
}
runMain()
{
if [ ! $# -eq 0 ]
then
runUsage
return 0
fi
TestType=$1
SourceFolder=Source
AllTestDataFolder=AllTestData
CodecFolder=Codec
ScriptFolder=Scripts
CurrentDir=`pwd`
SHA1TableFolder="SHA1Table"
FinalResultDir="FinalResult"
ReportDir="FinalTestReport"
runRemovedPreviousTestData
}
runMain