Debian Codegraph @

tests/aslts/bin/bugstate/parsebuglist

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2 #
3 # @echo off
4 #
5 # Parse the Bug List output file (ID State Result Component)
6 #
7 # Parameters:
8 #
9 # arg1 - pathname of file with the Bug List
10
11 # Includes
12
13 . commonscip-shell source . . common.
14 . settingsscip-shell source . . settings.
15
16 # ID State Result Component
17 #
18 # State:=[NEW|RESO|CLOS|ASSI|REJE|NEED]
19 # Result:=[CODE|PATC|DOCU|FIXE|INVA]
20 #
21 # State entries:
22 #
23 # NEW == NEW
24 # RESO == RESOLVED
25 # CLOS == CLOSED
26 # ASSI == ASSIGNED
27 # REJE == REJECTED
28 # NEED == NEEDINFO
29 #
30 # Result entries:
31 #
32 # FIXE == FIXED
33 # INVA == INVALID
34 # CODE == CODE_FIX
35 # PATC == PATCH_ALREADY_AVAILABLE
36 # DOCU == DOCUMENTED
37
38 get_summaryscip-shell shell acpica-unix 20260408-1 get_summary().()
39 {
40 # echo "=====================$s0:$s1:$s2:$s3:$s4:$s5:$line"
41
42 ID="$s0"
43 State="$s1"
44 Result=
45 Component=
46
47 if [scip-shell system . . `[`. "$State" == RESO\
48 -o "$State" == CLOS\
49 -o "$State" == REJE ]; then
50 Result="$s2"
51 if [scip-shell system . . `[`. "x$s4" == x ]; then
52 Component="$s3"
53 else
54 Component="$s3 $s4"
55 fi
56 else
57 if [scip-shell system . . `[`. "$State" != NEW\
58 -a "$State" != NEED\
59 -a "$State" != ASSI ]; then
60 echoscip-shell system . . echo. "ERROR 0: get_summary, <$State>"
61 CountERR=$[ $CountERR + 1 ]
62 else
63 if [scip-shell system . . `[`. "x$s3" == x ]; then
64 Component="$s2"
65 else
66 Component="$s2 $s3"
67 fi
68 fi
69 fi
70
71 echoscip-shell system . . echo. "$ID:$State: Exp $Result:$Component:"
72 }
73
74 # arg1 - pathname of file with the Bug List
75 do_summaryscip-shell shell acpica-unix 20260408-1 do_summary().()
76 {
77 started=
78
79 OLD_IFS=$IFS
80 IFS=" "
81
82 catscip-shell system . . cat. "$1" |\
83 while [scip-shell system . . `[`. 1 ]
84 do
85 read s0 s1 s2 s3 s4 s5 line
86 if [scip-shell system . . `[`. $? -ne 0 ] ; then
87 # echo "Number of the table inconsistency errors: CountERR = $CountERR"
88 if [scip-shell system . . `[`. "$CountERR" != 0 ]; then
89 return 1
90 fi
91 break
92 fi
93
94 if [scip-shell system . . `[`. "$s1" == bugs -a "$s2" == "found." ]; then
95 if [scip-shell system . . `[`. "$started" == yes ]; then
96 started=no
97 else
98 started=yes
99 fi
100 elif [scip-shell system . . `[`. "$started" == yes ]; then
101 get_summaryscip-shell shell acpica-unix 20260408-1 get_summary().
102 fi
103 done
104
105 ret=$?
106
107 IFS=$OLD_IFS
108
109 if [scip-shell system . . `[`. $ret -ne 0 ]; then
110 return 1
111 fi
112 }
113
114 # ############################## MAIN ###############################
115
116 PATHNAME="$1"
117 UTILSTATUS=0
118 SUMMARY=
119 CountERR=0
120
121 # echo "Parse the Bug List output file:"
122 # echo " $PATHNAME"
123
124 if [scip-shell system . . `[`. ! -f "$PATHNAME" ]; then
125 do_exit 1 "It is not file: <$PATHNAME>"
126 fi
127
128 do_summaryscip-shell shell acpica-unix 20260408-1 do_summary(). "$PATHNAME"
129 if [scip-shell system . . `[`. $? -ne 0 ]; then
130 do_exit 1 "parsebuglist failed"
131 else
132 exit 0
133 fi
134