llvm-project/lldb/test/Shell/Scripts/TestFrameworkFixScript.test
Chelsea Cassanova c73e5e3e20
[lldb][scripts] Fix bugs in framework fix script (#145961)
The script used to fix up LLDB's header for use in the macOS framework
contained 2 bugs that this commit addreses:

1. The output contents were appended to the output file multiple times
instead of only being written once.
2. The script was not considering LLDB includes that were *not* from the
SB API.

This commit addresses and fixes both of these bugs and updates the
corresponding test to match.
2025-06-26 15:06:37 -07:00

13 lines
605 B
Plaintext

# Create a temp dir for output and run the framework fix script on the truncated version of SBAddress.h in the inputs dir.
RUN: mkdir -p %t/Outputs
RUN: %python %p/../../../scripts/framework-header-fix.py -f lldb_main -i %p/Inputs/Main/SBAddress.h -o %t/Outputs/SBAddress.h -p /usr/bin/unifdef USWIG
# Check the output
RUN: cat %t/Outputs/SBAddress.h | FileCheck %s
# Local includes must be changed to framework level includes.
# e.g. #include "lldb/API/SBDefines.h" -> #include <LLDB/SBDefines.h>
CHECK: #include <LLDB/SBDefines.h>
CHECK: #include <LLDB/SBModule.h>
CHECK: #include <LLDB/lldb-types.h>