Skip to content

Commit

Permalink
mv api module integration test out of test framework
Browse files Browse the repository at this point in the history
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
  • Loading branch information
spacewander committed Jul 16, 2024
1 parent 6109acd commit 82dad40
Show file tree
Hide file tree
Showing 12 changed files with 73 additions and 73 deletions.
8 changes: 4 additions & 4 deletions api/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ build-test-so-local:
-ldflags "-B 0x$(shell head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') " \
--buildmode=c-shared \
-cover -covermode=atomic -coverpkg=${PROJECT_NAME}/... \
-v -o plugins/tests/integration/${TARGET_SO} \
${PROJECT_NAME}/api/plugins/tests/integration/libgolang
-v -o tests/integration/${TARGET_SO} \
${PROJECT_NAME}/api/tests/integration/libgolang

# Go 1.19+ adds vcs check which will cause error "fatal: detected dubious ownership in repository at '...'".
# So here we disable the error via git configuration when running inside Docker.
Expand All @@ -46,11 +46,11 @@ build-test-so:
.PHONY: integration-test
integration-test:
test -d /tmp/htnn_coverage && rm -rf /tmp/htnn_coverage || true
$(foreach PKG, $(shell go list ./plugins/tests/integration/...), \
$(foreach PKG, $(shell go list ./tests/integration/...), \
go test -v ${PKG} || exit 1; \
)

# The benchmark running time can be controlled via env var HTNN_DATA_PLANE_BENCHMARK_DURATION
.PHONY: benchmark
benchmark:
go test -tags benchmark -v ./plugins/tests/integration/ -run TestBenchmark
go test -tags benchmark -v ./tests/integration/ -run TestBenchmark
File renamed without changes.
File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (

"mosn.io/htnn/api/pkg/consumer"
"mosn.io/htnn/api/pkg/filtermanager"
_ "mosn.io/htnn/api/plugins/tests/integration" // for plugins used in the test
_ "mosn.io/htnn/api/plugins/tests/integration/data_plane" // for utility plugins provided in the test framework
_ "mosn.io/htnn/api/tests/integration" // for plugins used in the test
)

func init() {
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 82dad40

Please sign in to comment.