Skip to content

Commit 5bdd529

Browse files
committed
add folder
1 parent 243f3cc commit 5bdd529

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

csv2sqlite.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ echo '.mode column' >> $sql
3030
echo 'SELECT * FROM data;' >> $sql
3131
sqlite3 data.sqlite < $sql
3232
rm $sql
33-
rm data.csv
33+
rm data.csvccc

earlgreyTool.sh

+14-10
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
11
#!/bin/sh
22
LogParse(){
33
echo 'Log Parse Begin'
4-
path='EarlGreyToolLogs'
5-
if [ -d ]
64
now=$(date +%Y-%m-%d-%T)
7-
xcodebuild test -project mobile.xcodeproj -scheme mobile -destination 'platform=iOS Simulator,OS=9.3,name=iPhone 6 Plus' > $now.log
8-
headLineNum=$(awk '/========== Detailed Exception ==========/{ print NR;}' $now.log) #find a head
9-
endLineNum=$(awk '/ failed \(/{ print NR;}' $now.log) #find end line
5+
path=TestLogs
6+
fullLogPath=$path/$now.log
7+
errorLogPath=$path/error_$now.log
8+
echo $(pwd)/$fullLogPath
9+
echo $(pwd)/$errorLogPath
10+
if [ ! -d $path ]; then
11+
mkdir $path
12+
fi
13+
xcodebuild test -project mobile.xcodeproj -scheme mobile -destination 'platform=iOS Simulator,OS=9.3,name=iPhone 6 Plus' > $fullLogPath
14+
headLineNum=$(awk '/========== Detailed Exception ==========/{ print NR;}' $fullLogPath) #find a head
15+
endLineNum=$(awk '/ failed \(/{ print NR;}' $fullLogPath) #find end line
1016
hNums=(${headLineNum//\ / })
1117
eNums=(${endLineNum//\ / })
12-
if ${#hNums}=${#eNums}
13-
then
18+
if [ ${#hNums} = ${#eNums} ]; then
1419
echo ${#hNums}
1520
count=${#eNums[@]}
1621
for ((i=0;i<count;i++))
1722
do
1823
# echo loop $i
1924
for ((n=${hNums[$i]};n<=${eNums[$i]};n++))
2025
do
21-
sed "${n}q;d" $now.log >> error_$now.log
26+
sed "${n}q;d" $fullLogPath >> $errorLogPath
2227
done
2328
done
2429
elif${#hNums}=0 -a [${#eNums}=0 ]
@@ -27,10 +32,9 @@ LogParse(){
2732
else
2833
echo 'read line numbers error'
2934
fi
30-
tail -n 2 $now.log >> error_$now.log
35+
tail -n 2 $fullLogPath >> $errorLogPath
3136
}
3237

33-
i=$1
3438
if [ "$1" = "run" ]; then
3539
LogParse
3640
exit

0 commit comments

Comments
 (0)