feat: disktest添加原生包含fio的静态编译文件,不再需要额外安装fio依赖

This commit is contained in:
spiritsoul
2025-04-02 19:20:31 +08:00
parent 3956420ffe
commit 47e18ccab7
4 changed files with 15 additions and 15 deletions

4
go.mod
View File

@@ -8,9 +8,9 @@ require (
github.com/oneclickvirt/UnlockTests v0.0.26-20250329125926
github.com/oneclickvirt/backtrace v0.0.4-20250329130043
github.com/oneclickvirt/basics v0.0.11-20250401121437
github.com/oneclickvirt/cputest v0.0.10-20250329130006
github.com/oneclickvirt/cputest v0.0.10-20250401133339
github.com/oneclickvirt/defaultset v0.0.2-20240624082446
github.com/oneclickvirt/disktest v0.0.5-20250330105204
github.com/oneclickvirt/disktest v0.0.6-20250402111439
github.com/oneclickvirt/gostun v0.0.3-20250329105202
github.com/oneclickvirt/memorytest v0.0.4-20250329125725
github.com/oneclickvirt/nt3 v0.0.4-20250329125813

8
go.sum
View File

@@ -109,12 +109,12 @@ github.com/oneclickvirt/backtrace v0.0.4-20250329130043 h1:d3ubN7FTY2xDKN8mmLc1R
github.com/oneclickvirt/backtrace v0.0.4-20250329130043/go.mod h1:zvsC7xY/WZqs5KL2JB967OVnuqjNbxu9bW6wXRLo5h8=
github.com/oneclickvirt/basics v0.0.11-20250401121437 h1:Tdj5y9Y3kbfYebbWe+OTWMJKKSuKlitRZArpBXWVoU0=
github.com/oneclickvirt/basics v0.0.11-20250401121437/go.mod h1:yN1IEOXN6v/GJqJSA70Pooo6nXBI/6rq72vTY72wJMQ=
github.com/oneclickvirt/cputest v0.0.10-20250329130006 h1:IHt1btk79JfWCohc63TTwhI0vgbx4c2FrfTGT5zBtYg=
github.com/oneclickvirt/cputest v0.0.10-20250329130006/go.mod h1:MmaHN9+XMntI3rLycwj8Ne31fG18IfNoa8N2utDK1CY=
github.com/oneclickvirt/cputest v0.0.10-20250401133339 h1:fxWEDAt74Q4Xl0NMde8lDzUXEOgQ9B4eGLR3HkgrOs4=
github.com/oneclickvirt/cputest v0.0.10-20250401133339/go.mod h1:MmaHN9+XMntI3rLycwj8Ne31fG18IfNoa8N2utDK1CY=
github.com/oneclickvirt/defaultset v0.0.2-20240624082446 h1:5Pg3mK/u/vQvSz7anu0nxzrNdELi/AcDAU1mMsmPzyc=
github.com/oneclickvirt/defaultset v0.0.2-20240624082446/go.mod h1:e9Jt4tf2sbemCtc84/XgKcHy9EZ2jkc5x2sW1NiJS+E=
github.com/oneclickvirt/disktest v0.0.5-20250330105204 h1:FBCqQ1oSaOi8K1Xr3T2S1y6OZtdkUxB1NAGmV+lpMFk=
github.com/oneclickvirt/disktest v0.0.5-20250330105204/go.mod h1:wIZy8G6Mbcy8Op8tc0HmJNpbJQQ5A15fvnUqMJXIdO0=
github.com/oneclickvirt/disktest v0.0.6-20250402111439 h1:kTQX9XG9J/4yqzOjh6up0je7bw/YXe5vXRlgJHQjhzQ=
github.com/oneclickvirt/disktest v0.0.6-20250402111439/go.mod h1:wIZy8G6Mbcy8Op8tc0HmJNpbJQQ5A15fvnUqMJXIdO0=
github.com/oneclickvirt/gostun v0.0.3-20250329105202 h1:aJ6E91Lp94lq8iWRcCaxpXTjqOOaWvufr5oras6cFtM=
github.com/oneclickvirt/gostun v0.0.3-20250329105202/go.mod h1:f7DPEXAxbmwXSW33dbxtb0/KzqvOBWhTs2Or5xBerQA=
github.com/oneclickvirt/memorytest v0.0.4-20250329125725 h1:RTfaO7Ubc8eJz4DUtkO4/v2w/Qr/KITQZatgTr+CqIk=

View File

@@ -39,7 +39,7 @@ import (
)
var (
ecsVersion = "v0.1.25"
ecsVersion = "v0.1.26"
menuMode bool
onlyChinaTest bool
input, choice string

View File

@@ -1,6 +1,6 @@
#!/bin/bash
# From https://github.com/oneclickvirt/ecs
# 2024.12.08
# 2025.04.02
# curl -L https://raw.githubusercontent.com/oneclickvirt/ecs/master/goecs.sh -o goecs.sh && chmod +x goecs.sh
# 或
@@ -139,8 +139,8 @@ goecs_check() {
sleep 1
done
if [ -z "$ECS_VERSION" ]; then
_yellow "Unable to get version info, using default version 0.1.25"
ECS_VERSION="0.1.25"
_yellow "Unable to get version info, using default version 0.1.26"
ECS_VERSION="0.1.26"
fi
# Check if original goecs command exists
version_output=""
@@ -531,7 +531,7 @@ env_check() {
fi
fi
# Install necessary commands
for cmd in sudo wget tar unzip iproute2 systemd-detect-virt dd fio; do
for cmd in sudo wget tar unzip iproute2 systemd-detect-virt dd; do
if ! command -v "$cmd" >/dev/null 2>&1; then
_green "Installing $cmd"
${INSTALL_CMD} "$cmd"
@@ -573,8 +573,8 @@ env_check() {
fi
# MacOS support
if [ "$(uname -s)" = "Darwin" ]; then
echo "Detected MacOS, installing sysbench iproute2mac fio..."
brew install --force sysbench iproute2mac fio
echo "Detected MacOS, installing sysbench iproute2mac..."
brew install --force sysbench iproute2mac
else
if ! grep -q "^net.ipv4.ping_group_range = 0 2147483647$" /etc/sysctl.conf; then
echo "net.ipv4.ping_group_range = 0 2147483647" >> /etc/sysctl.conf
@@ -612,7 +612,7 @@ show_help() {
sysbench/geekbench (CPU性能测试必需)
可选组件:
sudo, tar, unzip, dd, fio
sudo, tar, unzip, dd
speedtest (网络测试)
ping (网络连通性测试)
systemd-detect-virt/dmidecode (系统信息检测)
@@ -641,7 +641,7 @@ Available commands:
sysbench/geekbench (Required for CPU testing)
Optional components:
sudo, tar, unzip, dd, fio
sudo, tar, unzip, dd
speedtest (Network testing)
ping (Network connectivity)
systemd-detect-virt/dmidecode (System info detection)