File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,19 @@ QLTEST_LOG="$CODEQL_EXTRACTOR_SWIFT_LOG_DIR"/qltest.log
6
6
7
7
export LD_LIBRARY_PATH=" $CODEQL_EXTRACTOR_SWIFT_ROOT /tools/$CODEQL_PLATFORM "
8
8
9
+ EXTRACTOR=" $CODEQL_EXTRACTOR_SWIFT_ROOT /tools/$CODEQL_PLATFORM /extractor"
10
+ SDK=" $CODEQL_EXTRACTOR_SWIFT_ROOT /qltest/$CODEQL_PLATFORM /sdk"
11
+
9
12
for src in * .swift; do
10
- opts=(-sdk " $CODEQL_EXTRACTOR_SWIFT_ROOT /qltest/ $CODEQL_PLATFORM /sdk " -c -primary-file $src )
13
+ opts=(-sdk " $SDK " -c -primary-file " $src " )
11
14
opts+=($( sed -n ' 1 s=//codeql-extractor-options:==p' $src ) )
12
15
echo -e " calling extractor with flags: ${opts[@]} \n" >> $QLTEST_LOG
13
- " $CODEQL_EXTRACTOR_SWIFT_ROOT /tools/$CODEQL_PLATFORM /extractor" " ${opts[@]} " >> $QLTEST_LOG 2>&1 || FAILED=1
16
+ if ! " $EXTRACTOR " " ${opts[@]} " >> $QLTEST_LOG 2>&1 ; then
17
+ FAILED=1
18
+ fi
14
19
done
15
20
16
- [ -z " $FAILED " ] || cat " $QLTEST_LOG " # Show compiler errors on extraction failure
21
+ if [ -n " $FAILED " ]; then
22
+ cat " $QLTEST_LOG " # Show compiler errors on extraction failure
23
+ exit 1
24
+ fi
You can’t perform that action at this time.
0 commit comments