Restructure the test directory
This commit is contained in:
parent
8d56238b4d
commit
490eaf6c81
|
|
@ -41,7 +41,7 @@ runs:
|
|||
shell: bash
|
||||
run: |
|
||||
make install_osdk
|
||||
bash test/benchmark/bench_linux_and_aster.sh "${{ matrix.benchmarks }}" "${{ inputs.platform }}"
|
||||
bash test/src/benchmark/bench_linux_and_aster.sh "${{ matrix.benchmarks }}" "${{ inputs.platform }}"
|
||||
BENCHMARK_ARTIFACT=results_$(echo "${{ matrix.benchmarks }}" | tr '/' '-')
|
||||
echo "BENCHMARK_ARTIFACT=$BENCHMARK_ARTIFACT" >> $GITHUB_ENV
|
||||
|
||||
|
|
@ -76,8 +76,8 @@ runs:
|
|||
BENCHMARK_DIR=$(echo "$benchmark_id" | sed 's/-/\//g')
|
||||
BENCHMARK_SUITE=$(echo "$BENCHMARK_DIR" | awk -F'/' '{print $1}')
|
||||
BENCHMARK_NAME=$(echo "$BENCHMARK_DIR" | sed -E 's|^[^/]+/||; s|/bench_results||g; s|/|_|g')
|
||||
BENCH_RESULT_YAML="test/benchmark/${BENCHMARK_DIR}/bench_result.yaml"
|
||||
[ -f "$BENCH_RESULT_YAML" ] || BENCH_RESULT_YAML="test/benchmark/${BENCHMARK_DIR}.yaml"
|
||||
BENCH_RESULT_YAML="test/src/benchmark/${BENCHMARK_DIR}/bench_result.yaml"
|
||||
[ -f "$BENCH_RESULT_YAML" ] || BENCH_RESULT_YAML="test/src/benchmark/${BENCHMARK_DIR}.yaml"
|
||||
|
||||
if [ ! -f "$BENCH_RESULT_YAML" ]; then
|
||||
echo "Warning: YAML file not found for $benchmark_id at $BENCH_RESULT_YAML. Skipping config generation."
|
||||
|
|
@ -91,9 +91,9 @@ runs:
|
|||
DESCRIPTION=$(yq -r '.chart.description // "No description provided"' "$BENCH_RESULT_YAML")
|
||||
|
||||
# Generate summary JSON if needed (only once per suite)
|
||||
SUMMARY_JSON="test/benchmark/$BENCHMARK_SUITE/summary.json"
|
||||
SUMMARY_JSON="test/src/benchmark/$BENCHMARK_SUITE/summary.json"
|
||||
if [ ! -f "$SUMMARY_JSON" ]; then
|
||||
SUMMARY_YAML="test/benchmark/$BENCHMARK_SUITE/summary.yaml"
|
||||
SUMMARY_YAML="test/src/benchmark/$BENCHMARK_SUITE/summary.yaml"
|
||||
if [ -f "$SUMMARY_YAML" ]; then
|
||||
yq . "$SUMMARY_YAML" > "$SUMMARY_JSON"
|
||||
echo "Generated $SUMMARY_JSON"
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ check-file = false
|
|||
# Files listed below are ignored to check.
|
||||
[files]
|
||||
extend-exclude = [
|
||||
"test/syscall_test/gvisor/blocklists/pty_test",
|
||||
"test/src/syscall/gvisor/blocklists/pty_test",
|
||||
"test/build/initramfs/opt/gvisor/blocklists/pty_test",
|
||||
"test/syscall_test/gvisor/blocklists/sync_test",
|
||||
"test/src/syscall/gvisor/blocklists/sync_test",
|
||||
"test/build/initramfs/opt/gvisor/blocklists/sync_test",
|
||||
]
|
||||
|
|
@ -34,7 +34,7 @@ cargo osdk test
|
|||
|
||||
### General Test
|
||||
|
||||
The following command builds and runs the test binaries in `test/apps` directory on Asterinas.
|
||||
The following command builds and runs the test binaries in `test/src/apps` directory on Asterinas.
|
||||
|
||||
```bash
|
||||
make run AUTO_TEST=test
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ $(INITRAMFS)/lib64:
|
|||
|
||||
$(INITRAMFS)/etc:
|
||||
@mkdir -p $@
|
||||
@cp $(CUR_DIR)/etc/* $@
|
||||
@cp $(CUR_DIR)/src/etc/* $@
|
||||
|
||||
# Install busybox into /bin and /usr/bin.
|
||||
$(INITRAMFS)/bin:
|
||||
|
|
@ -121,10 +121,10 @@ $(INITRAMFS)/usr/local:
|
|||
|
||||
.PHONY: $(INITRAMFS)/test
|
||||
$(INITRAMFS)/test:
|
||||
@$(MAKE) --no-print-directory -C apps
|
||||
@$(MAKE) --no-print-directory -C src/apps
|
||||
|
||||
$(INITRAMFS)/benchmark: | $(INITRAMFS)/benchmark/bin
|
||||
@cp -rf $(CUR_DIR)/benchmark/* $@
|
||||
@cp -rf $(CUR_DIR)/src/benchmark/* $@
|
||||
|
||||
$(INITRAMFS)/benchmark/bin:
|
||||
@mkdir -p $@
|
||||
|
|
@ -148,7 +148,7 @@ $(INITRAMFS_EMPTY_DIRS):
|
|||
|
||||
.PHONY: $(SYSCALL_TEST_DIR)
|
||||
$(SYSCALL_TEST_DIR):
|
||||
@$(MAKE) --no-print-directory -C syscall_test
|
||||
@$(MAKE) --no-print-directory -C src/syscall
|
||||
|
||||
.PHONY: $(INITRAMFS_IMAGE)
|
||||
$(INITRAMFS_IMAGE): $(INITRAMFS_FILELIST)
|
||||
|
|
@ -194,11 +194,11 @@ build: $(INITRAMFS_IMAGE) $(EXT2_IMAGE) $(EXFAT_IMAGE)
|
|||
|
||||
.PHONY: format
|
||||
format:
|
||||
@$(MAKE) --no-print-directory -C apps format
|
||||
@$(MAKE) --no-print-directory -C src/apps format
|
||||
|
||||
.PHONY: check
|
||||
check:
|
||||
@$(MAKE) --no-print-directory -C apps check
|
||||
@$(MAKE) --no-print-directory -C src/apps check
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ MAKEFLAGS += --no-builtin-rules
|
|||
MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
|
||||
CUR_DIR := $(patsubst %/,%,$(dir $(MKFILE_PATH)))
|
||||
|
||||
INITRAMFS ?= $(CUR_DIR)/../build/initramfs
|
||||
INITRAMFS ?= $(CUR_DIR)/../../build/initramfs
|
||||
TEST_BUILD_DIR ?= $(INITRAMFS)/test
|
||||
|
||||
# These test apps are sorted by name
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
# SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
CUR_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
BUILD_DIR := $(CUR_DIR)/../../build/initramfs/test/network
|
||||
ATOMIC_WGET := $(CUR_DIR)/../../../tools/atomic_wget.sh
|
||||
BUILD_DIR := $(CUR_DIR)/../../../build/initramfs/test/network
|
||||
ATOMIC_WGET := $(CUR_DIR)/../../../../tools/atomic_wget.sh
|
||||
MONGOOSE_DIR := $(CUR_DIR)
|
||||
MONGOOSE_C := $(MONGOOSE_DIR)/mongoose.c
|
||||
MONGOOSE_H := $(MONGOOSE_DIR)/mongoose.h
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue