mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-07-29 13:41:45 +08:00
test: 增加测试套件
This commit is contained in:
12
test/okvm-test/agent/build-windows.sh
Executable file
12
test/okvm-test/agent/build-windows.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
arch="${GOARCH:-amd64}"
|
||||
out="../bin/okvm-win-agent-${arch}.exe"
|
||||
|
||||
GOOS=windows GOARCH="$arch" CGO_ENABLED=0 \
|
||||
go build -trimpath -ldflags "-s -w" -o "$out" .
|
||||
|
||||
echo "Built $out"
|
||||
5
test/okvm-test/agent/go.mod
Normal file
5
test/okvm-test/agent/go.mod
Normal file
@@ -0,0 +1,5 @@
|
||||
module okvm-win-agent
|
||||
|
||||
go 1.22
|
||||
|
||||
require github.com/gorilla/websocket v1.5.3
|
||||
2
test/okvm-test/agent/go.sum
Normal file
2
test/okvm-test/agent/go.sum
Normal file
@@ -0,0 +1,2 @@
|
||||
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
|
||||
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
1202
test/okvm-test/agent/main.go
Normal file
1202
test/okvm-test/agent/main.go
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user