-
Notifications
You must be signed in to change notification settings - Fork 1
/
start_qc
executable file
·53 lines (48 loc) · 1.58 KB
/
start_qc
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
#!/bin/sh
WIFI_HAS=$(cat /sys/bus/sdio/devices/mmc1\:0001\:1/vendor)
if [[ "$WIFI_HAS" == "0x0097" ]]; then
CONFIG=./tn-qc/st7b2.conf
else
CONFIG=./tn-qc/st7b2_nw.conf
fi
rm ./tn-qc/st7b2_tmp.conf
cp "$CONFIG" ./tn-qc/st7b2_tmp.conf
cd tn-qc
echo "" > all_pass
echo "Failed" > results/Bluetooth/result.txt
echo "Failed" > results/CAN_bus/result.txt
echo "Failed" > results/CPU/result.txt
echo "Failed" > results/Ethernet/result.txt
echo "Failed" > results/GPIO/result.txt
echo "Failed" > results/I2C1/result.txt
echo "Failed" > results/LED/result.txt
echo "Failed" > results/Memory/result.txt
echo "Failed" > results/mPCIE/result.txt
echo "Failed" > results/Nand_flash/result.txt
echo "Failed" > results/RTC/result.txt
echo "Failed" > results/SD/result.txt
echo "Failed" > results/SIM_card/result.txt
echo "Failed" > results/Switch_LAN/result.txt
echo "Failed" > results/UART/result.txt
echo "Failed" > results/USB/result.txt
echo "Failed" > results/Wifi/result.txt
echo "Failed" > results/EEPROM/result.txt
echo "Failed" > results/TEMP/result.txt
rm results/MACs/*
./run_qc.sh &
./functions/getmac.sh &
cd -
while true; do
cat $CONFIG | while read line; do
cat tn-qc/results/$line/result.txt >> tn-qc/result_temp
done
cp tn-qc/result_temp tn-qc/result_final
rm tn-qc/result_temp
all_pass=$(cat ./tn-qc/result_final | grep "Failed")
if [[ "$all_pass" == "" ]]; then
echo "all_pass" > ./tn-qc/all_pass
else
echo "" > ./tn-qc/all_pass
fi
sleep 1
done