File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed
regression/goto-cc-goto-analyzer Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change
1
+ This subdirectory is for tests where goto-cc is used to produce
2
+ a goto binary that is then passed to goto-analyzer. There is also
3
+ the option to have a custom script to produce the goto binary
4
+ should this require special handling or multiple steps. This
5
+ script is run if the root name of the test file has a script with
6
+ the same filename. For example, if the desc file specifies
7
+ test.c as the test file then the chain.sh script will check for
8
+ the existence of test.sh and if test.sh exists then it will be used
9
+ to build the goto binary (assumed to be test.gb).
Original file line number Diff line number Diff line change @@ -9,12 +9,17 @@ is_windows=$3
9
9
options=${*: 4: $# -4}
10
10
name=${*: $# }
11
11
name=${name% .c}
12
+ buildgoto=${name} .sh
12
13
13
- if [[ " ${is_windows} " == " true" ]]; then
14
- " ${goto_cc} " " ${name} .c"
15
- mv " ${name} .exe" " ${name} .gb"
14
+ if test -f ${buildgoto} ; then
15
+ ./${buildgoto} ${goto_cc} ${is_windows}
16
16
else
17
- " ${goto_cc} " " ${name} .c" -o " ${name} .gb"
17
+ if [[ " ${is_windows} " == " true" ]]; then
18
+ " ${goto_cc} " " ${name} .c"
19
+ mv " ${name} .exe" " ${name} .gb"
20
+ else
21
+ " ${goto_cc} " " ${name} .c" -o " ${name} .gb"
22
+ fi
18
23
fi
19
24
20
25
" ${goto_analyzer} " " ${name} .gb" ${options}
You can’t perform that action at this time.
0 commit comments