blob: 48a9a8483ef7b7a0701f41a62253381c747f0c36 [file] [edit]
# REQUIRES: python, asserts, !system-windows
# Test that when a module is listed in target.auto-load-scripts-for-modules with 'warn',
# its scripting resources are NOT loaded even when target.load-script-from-symbol-file
# is true but we print a warning.
# RUN: split-file %s %t
# RUN: %clang_host %t/main.c -o %t/TestModule.out
# RUN: mkdir -p %t/safe-path/TestModule
# RUN: cp %t/script.py %t/safe-path/TestModule/TestModule.py
# RUN: %lldb -b \
# RUN: -o 'settings set target.load-script-from-symbol-file true' \
# RUN: -o 'settings append testing.safe-auto-load-paths %t/safe-path' \
# RUN: -o 'settings set target.auto-load-scripts-for-modules TestModule=warn' \
# RUN: -o 'target create %t/TestModule.out' 2>&1 \
# RUN: | FileCheck %s --implicit-check-not=AUTOLOAD_SUCCESS
# CHECK-WARN: warning: 'TestModule' contains an untrusted debug script. To run this script in this debug session:
#--- main.c
int main() { return 0; }
#--- script.py
import sys
def __lldb_init_module(debugger, internal_dict):
print("AUTOLOAD_SUCCESS", file=sys.stderr)