From 52727a053c45f8d6c634d405742c3289a0be1f78 Mon Sep 17 00:00:00 2001 From: Thomas Vanbesien Date: Wed, 18 Feb 2026 23:36:35 +0100 Subject: Rename CMake project and executable targets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Project: OpcUaC → BobinkOpcUaC Targets: ServerLDS → bobink_opcua_discovery_server, ServerRegister → bobink_opcua_server, Client → client --- tests/run_cert_bootstrap_test.sh | 18 +++++++++--------- tests/run_download_cert_test.sh | 6 +++--- tests/run_test.sh | 14 +++++++------- 3 files changed, 19 insertions(+), 19 deletions(-) (limited to 'tests') diff --git a/tests/run_cert_bootstrap_test.sh b/tests/run_cert_bootstrap_test.sh index 8d31783..681a4aa 100755 --- a/tests/run_cert_bootstrap_test.sh +++ b/tests/run_cert_bootstrap_test.sh @@ -75,19 +75,19 @@ for port in $LDS_PORT $SR_PORT; do done # ── start LDS ────────────────────────────────────────────────── -build/ServerLDS "$CONFIG_DIR/server_lds.conf" >/dev/null 2>&1 & +build/bobink_opcua_discovery_server "$CONFIG_DIR/server_lds.conf" >/dev/null 2>&1 & LDS_PID=$! -wait_for_port "$LDS_PORT" "$LDS_PID" "ServerLDS" +wait_for_port "$LDS_PORT" "$LDS_PID" "bobink_opcua_discovery_server" # ── start ServerRegister ─────────────────────────────────────── -build/ServerRegister "$CONFIG_DIR/server_register.conf" "$CONFIG_DIR/server_register_client.conf" "opc.tcp://localhost:$LDS_PORT" >/dev/null 2>&1 & +build/bobink_opcua_server "$CONFIG_DIR/server_register.conf" "$CONFIG_DIR/server_register_client.conf" "opc.tcp://localhost:$LDS_PORT" >/dev/null 2>&1 & SR_PID=$! -wait_for_port "$SR_PORT" "$SR_PID" "ServerRegister" +wait_for_port "$SR_PORT" "$SR_PID" "bobink_opcua_server" TMPFILE=$(mktemp) # ── Step 1: FindServers on LDS (client trusts LDS) ──────────── -build/Client "$CONFIG_DIR/client.conf" find-servers "opc.tcp://localhost:$LDS_PORT" >"$TMPFILE" 2>&1 +build/client "$CONFIG_DIR/client.conf" find-servers "opc.tcp://localhost:$LDS_PORT" >"$TMPFILE" 2>&1 FS_RC=$? FS_OUTPUT=$(<"$TMPFILE") @@ -98,7 +98,7 @@ echo "$FS_OUTPUT" | grep -q "urn:localhost:bobink:ServerRegister" check "find-servers contains urn:localhost:bobink:ServerRegister" $? # ── Step 2: GetEndpoints on ServerRegister (should FAIL) ────── -build/Client "$CONFIG_DIR/client.conf" get-endpoints "opc.tcp://localhost:$SR_PORT" >"$TMPFILE" 2>&1 +build/client "$CONFIG_DIR/client.conf" get-endpoints "opc.tcp://localhost:$SR_PORT" >"$TMPFILE" 2>&1 GE_FAIL_RC=$? GE_FAIL_OUTPUT=$(<"$TMPFILE") @@ -108,7 +108,7 @@ check "get-endpoints FAILS without ServerRegister cert (exit code $GE_FAIL_RC)" # ── Step 3: download-cert from ServerRegister (via None) ────── DOWNLOADED_CERT=$(mktemp --suffix=.der) -build/Client "$CONFIG_DIR/client.conf" download-cert "opc.tcp://localhost:$SR_PORT" "$DOWNLOADED_CERT" >"$TMPFILE" 2>&1 +build/client "$CONFIG_DIR/client.conf" download-cert "opc.tcp://localhost:$SR_PORT" "$DOWNLOADED_CERT" >"$TMPFILE" 2>&1 DC_RC=$? DC_OUTPUT=$(<"$TMPFILE") @@ -126,7 +126,7 @@ check "downloaded certificate matches ServerRegister cert.der" $? cp "$DOWNLOADED_CERT" "$CONFIG_DIR/certs/trust_client/ServerRegister_cert.der" # ── Step 6: GetEndpoints on ServerRegister (should succeed) ─── -build/Client "$CONFIG_DIR/client.conf" get-endpoints "opc.tcp://localhost:$SR_PORT" >"$TMPFILE" 2>&1 +build/client "$CONFIG_DIR/client.conf" get-endpoints "opc.tcp://localhost:$SR_PORT" >"$TMPFILE" 2>&1 GE_RC=$? GE_OUTPUT=$(<"$TMPFILE") @@ -137,7 +137,7 @@ echo "$GE_OUTPUT" | grep -q "Aes256_Sha256_RsaPss" check "get-endpoints contains Aes256_Sha256_RsaPss" $? # ── Step 7: ReadTime on ServerRegister (should succeed) ─────── -build/Client "$CONFIG_DIR/client.conf" read-time "opc.tcp://localhost:$SR_PORT" >"$TMPFILE" 2>&1 +build/client "$CONFIG_DIR/client.conf" read-time "opc.tcp://localhost:$SR_PORT" >"$TMPFILE" 2>&1 RT_RC=$? RT_OUTPUT=$(<"$TMPFILE") diff --git a/tests/run_download_cert_test.sh b/tests/run_download_cert_test.sh index f20609c..3631c56 100755 --- a/tests/run_download_cert_test.sh +++ b/tests/run_download_cert_test.sh @@ -63,15 +63,15 @@ if ss -tlnp 2>/dev/null | grep -q ":${LDS_PORT} "; then fi # ── start LDS ────────────────────────────────────────────────── -build/ServerLDS "$CONFIG_DIR/server_lds.conf" >/dev/null 2>&1 & +build/bobink_opcua_discovery_server "$CONFIG_DIR/server_lds.conf" >/dev/null 2>&1 & LDS_PID=$! -wait_for_port "$LDS_PORT" "$LDS_PID" "ServerLDS" +wait_for_port "$LDS_PORT" "$LDS_PID" "bobink_opcua_discovery_server" # ── download certificate ─────────────────────────────────────── TMPFILE=$(mktemp) DOWNLOADED_CERT=$(mktemp --suffix=.der) -build/Client "$CONFIG_DIR/client.conf" download-cert "opc.tcp://localhost:$LDS_PORT" "$DOWNLOADED_CERT" >"$TMPFILE" 2>&1 +build/client "$CONFIG_DIR/client.conf" download-cert "opc.tcp://localhost:$LDS_PORT" "$DOWNLOADED_CERT" >"$TMPFILE" 2>&1 DC_RC=$? DC_OUTPUT=$(<"$TMPFILE") diff --git a/tests/run_test.sh b/tests/run_test.sh index fc44ad6..6d17958 100755 --- a/tests/run_test.sh +++ b/tests/run_test.sh @@ -63,14 +63,14 @@ for port in $LDS_PORT $SR_PORT; do done # ── start LDS ────────────────────────────────────────────────── -build/ServerLDS "$CONFIG_DIR/server_lds.conf" >/dev/null 2>&1 & +build/bobink_opcua_discovery_server "$CONFIG_DIR/server_lds.conf" >/dev/null 2>&1 & LDS_PID=$! -wait_for_port "$LDS_PORT" "$LDS_PID" "ServerLDS" +wait_for_port "$LDS_PORT" "$LDS_PID" "bobink_opcua_discovery_server" # ── start ServerRegister ─────────────────────────────────────── -build/ServerRegister "$CONFIG_DIR/server_register.conf" "$CONFIG_DIR/server_register_client.conf" "opc.tcp://localhost:$LDS_PORT" >/dev/null 2>&1 & +build/bobink_opcua_server "$CONFIG_DIR/server_register.conf" "$CONFIG_DIR/server_register_client.conf" "opc.tcp://localhost:$LDS_PORT" >/dev/null 2>&1 & SR_PID=$! -wait_for_port "$SR_PORT" "$SR_PID" "ServerRegister" +wait_for_port "$SR_PORT" "$SR_PID" "bobink_opcua_server" # ── validation helper ───────────────────────────────────────── check() { @@ -85,7 +85,7 @@ check() { # ── FindServers ─────────────────────────────────────────────── TMPFILE=$(mktemp) -build/Client "$CONFIG_DIR/client.conf" find-servers "opc.tcp://localhost:$LDS_PORT" >"$TMPFILE" 2>&1 +build/client "$CONFIG_DIR/client.conf" find-servers "opc.tcp://localhost:$LDS_PORT" >"$TMPFILE" 2>&1 FS_RC=$? FS_OUTPUT=$(<"$TMPFILE") @@ -96,7 +96,7 @@ echo "$FS_OUTPUT" | grep -q "urn:localhost:bobink:ServerRegister" check "find-servers contains urn:localhost:bobink:ServerRegister" $? # ── GetEndpoints ────────────────────────────────────────────── -build/Client "$CONFIG_DIR/client.conf" get-endpoints "opc.tcp://localhost:$SR_PORT" >"$TMPFILE" 2>&1 +build/client "$CONFIG_DIR/client.conf" get-endpoints "opc.tcp://localhost:$SR_PORT" >"$TMPFILE" 2>&1 GE_RC=$? GE_OUTPUT=$(<"$TMPFILE") @@ -107,7 +107,7 @@ echo "$GE_OUTPUT" | grep -q "$EXPECTED_POLICY" check "get-endpoints contains $EXPECTED_POLICY" $? # ── ReadTime ────────────────────────────────────────────────── -build/Client "$CONFIG_DIR/client.conf" read-time "opc.tcp://localhost:$SR_PORT" >"$TMPFILE" 2>&1 +build/client "$CONFIG_DIR/client.conf" read-time "opc.tcp://localhost:$SR_PORT" >"$TMPFILE" 2>&1 RT_RC=$? RT_OUTPUT=$(<"$TMPFILE") -- cgit v1.2.3