mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-18 22:16:18 -05:00
18 lines
735 B
Bash
18 lines
735 B
Bash
#!/usr/bin/env bash
|
|
# Run the native packet-pipe regression against the bundled Windows DLL.
|
|
set -euo pipefail
|
|
subsystem=$3
|
|
export PATH="/$subsystem/bin:/usr/bin:$PATH"
|
|
repo=$(cygpath -u "$1")
|
|
prefix=$(cygpath -u "$2")
|
|
build_dir="$repo/target/openconnect-windows"
|
|
source_dir="$repo/crates/openconnect/deps/openconnect"
|
|
export PATH="$prefix/bin:$PATH"
|
|
compiler=gcc
|
|
if [[ $subsystem == clangarm64 ]]; then compiler=clang; fi
|
|
"$compiler" -Wall -Wextra -I"$build_dir" -I"$source_dir" -I"$source_dir/json" \
|
|
$(pkg-config --cflags gnutls libxml-2.0) \
|
|
"$repo/crates/openconnect/tests/windows_packet_pipe.c" \
|
|
-L"$prefix/lib" -lopenconnect -lws2_32 -o "$build_dir/test-windows-packet-pipe.exe"
|
|
"$build_dir/test-windows-packet-pipe.exe"
|