mirror of
https://github.com/github/codeql.git
synced 2026-04-22 23:35:14 +02:00
While I would have preferred to add a proper unit test, this required more infrastructure for mocking system calls. Instead I made `qltest.sh` accept a `//codeql-extractor-env` header and used that to write a QL test exercising the `RUN_UNDER` functionality.
8 lines
238 B
Bash
Executable File
8 lines
238 B
Bash
Executable File
ARGS=$(echo $@ | sed 's='$CODEQL_EXTRACTOR_SWIFT_ROOT'=$CODEQL_EXTRACTOR_SWIFT_ROOT=g; s/'$CODEQL_PLATFORM'/$CODEQL_PLATFORM/g')
|
|
|
|
cat > $CODEQL_EXTRACTOR_SWIFT_TRAP_DIR/$$.trap << EOF
|
|
string_literal_exprs(*, "run_under: $ARGS")
|
|
EOF
|
|
|
|
"$@"
|