Skip to content

Commit

Permalink
disable KVM acceleration and install redis-tools for ci test
Browse files Browse the repository at this point in the history
  • Loading branch information
ken4647 committed Jun 25, 2024
1 parent d2b5a19 commit 715bb79
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ jobs:
use-tool-cache: true
- name: Install gcc multilib
run: sudo apt update && sudo apt install -y gcc-multilib
- name: Install redis-tools
run: sudo apt update && sudo apt install -y redis-tools
- name: Install psutils
run: sudo apt update && sudo apt install python3-pip && pip install psutil
run: sudo apt update && sudo apt install python3-pip && pip install psutil
- uses: ./.github/workflows/actions/setup-qemu
with:
qemu-version: ${{ env.qemu-version }}
Expand Down
14 changes: 7 additions & 7 deletions scripts/test/app_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def check_output_contains(output: str, expect_path: str) -> bool:
def eval_libc_bench(arch: str):
APP_PATH = "apps/c/libc-bench"
CLEAN_CMD = f"make A={APP_PATH} MUSL=y clean"
RUN_CMD = f"make A={APP_PATH} ARCH={arch} LOG=warn MUSL=y SMP=4 run"
RUN_CMD = f"make A={APP_PATH} ARCH={arch} LOG=warn MUSL=y SMP=4 ACCEL=n run"

subprocess.run(CLEAN_CMD,
shell=True,
Expand Down Expand Up @@ -57,7 +57,7 @@ def eval_nginx(arch: str):
CLEAN_CMD = f"make A={APP_PATH} LOG=warn NET=y BLK=y ARCH={arch} SMP=4 MUSL=y clean"
ClONE_CMD = f"git clone {GIT_URL} {APP_PATH}"
BUILD_CMD = f"make A={APP_PATH} LOG=warn NET=y BLK=y ARCH={arch} SMP=4 MUSL=y build"
RUN_CMD = f"make A={APP_PATH} LOG=warn NET=y BLK=y ARCH={arch} SMP=4 MUSL=y run"
RUN_CMD = f"make A={APP_PATH} LOG=warn NET=y BLK=y ARCH={arch} SMP=4 MUSL=y ACCEL=n run"
TEST_CMD = f"wget 127.0.0.1:5555 --tries=5 "
RM_CMD = f"rm index.html"

Expand Down Expand Up @@ -142,7 +142,7 @@ def eval_redis(arch: str):
ClONE_CMD = f"git clone {GIT_URL} {APP_PATH}"
BUILD_CMD = f"make A={APP_PATH} MUSL=y LOG=warn NET=y V9P=y BLK=y FEATURES=virtio-9p V9P_PATH=apps/c/redis ARCH={arch} SMP=4 ARGS=\"./redis-server,/v9fs/redis.conf\""
CLEAN_CMD = f"make A={APP_PATH} MUSL=y clean"
RUN_CMD = f"make A={APP_PATH} LOG=warn NET=y MUSL=y V9P=y BLK=y FEATURES=virtio-9p V9P_PATH=apps/c/redis ARCH={arch} SMP=4 ARGS=\"./redis-server,/v9fs/redis.conf\" run"
RUN_CMD = f"make A={APP_PATH} LOG=warn NET=y MUSL=y V9P=y BLK=y FEATURES=virtio-9p V9P_PATH=apps/c/redis ARCH={arch} SMP=4 ARGS=\"./redis-server,/v9fs/redis.conf\" ACCEL=n run"
BENCHMARK_SET_CMD = "redis-benchmark -p 5555 -n 100000 -q -t set -c 30"
BENCHMARK_GET_CMD = "redis-benchmark -p 5555 -n 100000 -q -t get -c 30"

Expand Down Expand Up @@ -188,11 +188,11 @@ def eval_redis(arch: str):
redis_server.terminate()
redis_server.wait(timeout=30)
time.sleep(3)


print(set_client.stdout)
print(get_client.stdout)
if not ("SET" in set_client.stdout and "GET" in get_client.stdout):
print(set_client.stdout)
print(set_client.stderr)
print(get_client.stdout)
print(get_client.stderr)
return 1 # failed

Expand All @@ -204,7 +204,7 @@ def eval_wamr(arch: str):
APP_PATH = "apps/c/wamr"
ClONE_CMD = f"git clone {GIT_URL} {APP_PATH}"
CLEAN_CMD = f"make A={APP_PATH} ARCH={arch} MUSL=y clean"
RUN_CMD = f"make A={APP_PATH} ARCH={arch} LOG=warn SMP=4 MUSL=y NET=y V9P=y V9P_PATH=apps/c/wamr/rootfs ARGS=\"iwasm,/main.wasm\" run"
RUN_CMD = f"make A={APP_PATH} ARCH={arch} LOG=warn SMP=4 MUSL=y NET=y V9P=y V9P_PATH=apps/c/wamr/rootfs ARGS=\"iwasm,/main.wasm\" ACCEL=n run"

subprocess.run(ClONE_CMD,
shell=True,
Expand Down

0 comments on commit 715bb79

Please sign in to comment.