FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
codeql/swift/tools/qltest.sh at codeql-cli-2.20.0 · github/codeql · GitHub
github
/
codeql
Public
Notifications
You must be signed in to change notification settings
Fork
2.1k
Star
10.1k
Code
Issues
1k
Pull requests
470
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
codeql
/
swift
/
tools
/
qltest.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
28 lines (24 loc) · 1002 Bytes
Breadcrumbs
codeql
/
swift
/
tools
/
qltest.sh
Copy path
File metadata and controls
executable file
·
28 lines (24 loc) · 1002 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
#!
/bin/bash
mkdir -p
"
$CODEQL_EXTRACTOR_SWIFT_TRAP_DIR
"
QLTEST_LOG=
"
$CODEQL_EXTRACTOR_SWIFT_LOG_DIR
"
/qltest.log
EXTRACTOR=
"
$CODEQL_EXTRACTOR_SWIFT_ROOT
/tools/
$CODEQL_PLATFORM
/extractor
"
RESOURCE_DIR=
"
$CODEQL_EXTRACTOR_SWIFT_ROOT
/resource-dir/
$CODEQL_PLATFORM
"
export
CODEQL_EXTRACTOR_SWIFT_LOG_LEVELS=
${CODEQL_EXTRACTOR_SWIFT_LOG_LEVELS
:-
out
:
text
:
no_logs,out
:
console
:
info}
for
src
in
*
.swift
;
do
env=()
opts=(-resource-dir
"
$RESOURCE_DIR
"
-c -primary-file
"
$src
"
)
opts+=(
$(
sed -n
'
1 s=//codeql-extractor-options:==p
'
$src
)
)
expected_status=
$(
sed -n
'
s=//codeql-extractor-expected-status:[[:space:]]*==p
'
$src
)
expected_status=
${expected_status
:-
0}
env+=(
$(
sed -n
'
1 s=//codeql-extractor-env:==p
'
$src
)
)
echo
>>
$QLTEST_LOG
env
"
${env[@]}
"
"
$EXTRACTOR
"
"
${opts[@]}
"
>>
$QLTEST_LOG
2>&1
actual_status=
$?
if
[[
$actual_status
!=
$expected_status
]]
;
then
FAILED=1
fi
done
if
[
-n
"
$FAILED
"
]
;
then
cat
"
$QLTEST_LOG
"
#
Show compiler errors on extraction failure
exit
1
fi
Back
|
FazBrowse Home
|
New Git URL