Files
codeql/swift/ql/test/extractor-tests/run_under/run_under.sh
Paolo Tranquilli 3acd4486a3 Swift: add tests for RUN_UNDER support
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.
2022-11-02 12:09:13 +01:00

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
"$@"