llvm-project/lldb/test/Shell/Scripts/TestRPCFrameworkFixScript.test
Chelsea Cassanova 8a8ea8fec0
Reland "[lldb][headers] Create Python script to fix up framework head… (#143945)
…ers" (#143941)

Reland the script that converts lldb headers to RPC headers. The RPC
test was failing due to the incorrect input filepath being used.

Original commit message:
This commit replaces the shell script that fixes up includes for the
LLDB framework with a Python script. This script will also be used when
fixing up includes for the LLDBRPC.framework.
2025-06-12 13:55:44 -07:00

15 lines
775 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_rpc -i %p/Inputs/RPC/RPCSBAddress.h -o %t/Outputs/RPCSBAddress.h -p /usr/bin/unifdef USWIG
# Check the output
RUN: cat %t/Outputs/RPCSBAddress.h | FileCheck %s
# Local includes must be changed to RPC framework level includes.
# e.g. #include "SBDefines.h" -> #include <LLDBRPC/SBDefines.h>
# Also, RPC common code includes must change to RPC framework level includes.
# e.g. #include "lldb-rpc/common/RPCPublic.h" -> #include <LLDBRPC/RPCPublic.h>
CHECK: #include <LLDBRPC/LLDBRPC.h>
CHECK: #include <LLDBRPC/SBDefines.h>
CHECK: #include <LLDBRPC/RPCPublic.h>