Debian Codegraph @

tests/aslts/bin/bugstate/bdemosconc

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2 #
3 # @echo off
4 #
5 # Concatenate bdemo summary files (obtained by bdemossum)
6 # of two multi-results.
7 #
8 # Parameters:
9 #
10 # arg1 - the first multi-result directory
11 # arg2 - the second multi-result directory
12 #
13 # (for comments see Do and asltsrun utilities).
14
15 # Includes
16
17 . commonscip-shell source . . common.
18 . settingsscip-shell source . . settings.
19
20 get_summaryscip-shell shell acpica-unix 20260408-1 get_summary().()
21 {
22 OLD_IFS=$IFS
23 IFS=":"
24
25 cat\
26 $path0\
27 $path1\
28 $path2\
29 $path3\
30 $path4\
31 $path5\
32 $path6\
33 $path7 |\
34 while [scip-shell system . . `[`. 1 ]
35 do
36 read number line
37 if [scip-shell system . . `[`. $? -ne 0 ] ; then
38 do_report_summaryscip-shell shell acpica-unix 20260408-1 do_report_summary().
39 break
40 fi
41
42 if [scip-shell system . . `[`. "x$number" != x ]; then
43 SUMMARY[$number]=${SUMMARY[$number]}"|$line"
44 fi
45
46 done
47
48 IFS=$OLD_IFS
49 }
50
51 # arg1 - multi-result directory
52 # arg2 - mode of run
53 get_name_of_bdemossumscip-shell shell acpica-unix 20260408-1 get_name_of_bdemossum().()
54 {
55 local path modepart0
56
57 modepart0=`get_mode_string $2 0`
58 path="$1/$modepart0/__STATUS_OF_BDEMO_TESTS"
59 echoscip-shell system . . echo. "$path"
60 }
61
62 do_report_summaryscip-shell shell acpica-unix 20260408-1 do_report_summary().()
63 {
64 index=0
65
66 while [scip-shell system . . `[`. 1 ]
67 do
68 if [[ $index -ge $MAXBDEMO ]]; then
69 break
70 fi
71
72 echoscip-shell system . . echo. "$index${SUMMARY[$index]}"
73
74 index=$[ $index + 1 ]
75 done
76 }
77
78 # ############################## MAIN ###############################
79
80 DIR0="$1"
81 DIR1="$2"
82 UTILSTATUS=0
83 SUMMARY=
84
85 # Initialization
86
87 INIT_MAX_BDEMO
88
89 echoscip-shell system . . echo. "The number of bdemo-tests is equal to $MAXBDEMO"
90
91 # Do summary files of bdemos
92
93 if [scip-shell system . . `[`. -d "$DIR0" ]; then
94 bdemossum "$DIR0" 0
95 fi
96 if [scip-shell system . . `[`. -d "$DIR1" ]; then
97 bdemossum "$DIR1" 1
98 fi
99
100 # Concatenate the summary files of bdemos of two multi-results
101
102 echoscip-shell system . . echo. "Concatenating bdemo summary files of two multi-results:"
103 echoscip-shell system . . echo. " the first : $DIR0"
104 echoscip-shell system . . echo. " the second : $DIR1"
105
106 bdemo_sum=
107 if [scip-shell system . . `[`. -d "$DIR0" ]; then
108 bdemo_sum="$DIR0/__STATUS_OF_ALL_BDEMO_TESTS"
109 elif [scip-shell system . . `[`. -d "$DIR1" ]; then
110 bdemo_sum="$DIR1/__STATUS_OF_ALL_BDEMO_TESTS"
111 else
112 do_exit 1 "No one directory specified by both parameters"
113 fi
114
115 path0=""
116 path1=""
117 path2=""
118 path3=""
119 path4=""
120 path5=""
121 path6=""
122 path7=""
123
124 if [scip-shell system . . `[`. -d "$DIR0" ]; then
125 path0=`get_name_of_bdemossumscip-shell shell acpica-unix 20260408-1 get_name_of_bdemossum(). "$DIR0" $NORM32`
126 path1=`get_name_of_bdemossumscip-shell shell acpica-unix 20260408-1 get_name_of_bdemossum(). "$DIR0" $NORM64`
127 path2=`get_name_of_bdemossumscip-shell shell acpica-unix 20260408-1 get_name_of_bdemossum(). "$DIR0" $SLACK32`
128 path3=`get_name_of_bdemossumscip-shell shell acpica-unix 20260408-1 get_name_of_bdemossum(). "$DIR0" $SLACK64`
129 fi
130 if [scip-shell system . . `[`. -d "$DIR1" ]; then
131 path4=`get_name_of_bdemossumscip-shell shell acpica-unix 20260408-1 get_name_of_bdemossum(). "$DIR1" $NORM32`
132 path5=`get_name_of_bdemossumscip-shell shell acpica-unix 20260408-1 get_name_of_bdemossum(). "$DIR1" $NORM64`
133 path6=`get_name_of_bdemossumscip-shell shell acpica-unix 20260408-1 get_name_of_bdemossum(). "$DIR1" $SLACK32`
134 path7=`get_name_of_bdemossumscip-shell shell acpica-unix 20260408-1 get_name_of_bdemossum(). "$DIR1" $SLACK64`
135 fi
136
137 get_summaryscip-shell shell acpica-unix 20260408-1 get_summary(). > "$bdemo_sum"
138
139 exit $UTILSTATUS
140
141
142