Files
LeechCore/tests/check_linux_fpga_session_codegen.sh
2026-07-30 04:53:58 -04:00

21 lines
551 B
Bash

#!/usr/bin/env bash
set -eu
root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
work=$(mktemp -d)
object="$work/device_fpga.o"
gcc -c "$root/leechcore/device_fpga.c" \
-I"$root/leechcore" -I"$root/includes" \
-D LINUX -D _GNU_SOURCE \
-O1 -fPIC -Wall -Wno-multichar -Wno-unused-variable \
$(pkg-config libusb-1.0 --cflags) \
-o "$object"
if nm -u "$object" |
grep -q 'DeviceFPGA_Session_TlpFrameStep'; then
echo "unexpected external Linux framing call" >&2
exit 1
fi
echo "PASS: Linux framing transition is inline"