mirror of
https://github.com/alibaba/higress.git
synced 2026-03-10 11:40:49 +08:00
feat: support only build one plugin to testing specified WasmPlugin (#371)
Co-authored-by: 澄潭 <zty98751@alibaba-inc.com>
This commit is contained in:
@@ -19,6 +19,7 @@ Higress provides make target to run ingress api conformance tests and wasmplugin
|
||||
|
||||
+ API Tests: `make ingress-conformance-test`
|
||||
+ WasmPlugin Tests: `make ingress-wasmplugin-test`
|
||||
+ Only build one WasmPlugin for testing: `PLUGIN_NAME=request-block make ingress-wasmplugin-test`
|
||||
|
||||
It can be divided into below steps:
|
||||
|
||||
|
||||
@@ -18,6 +18,19 @@ set -euo pipefail
|
||||
|
||||
cd ./plugins/wasm-go/
|
||||
|
||||
# developer need to declear new wasmplugins here for test
|
||||
PLUGIN_NAME=http-call make build
|
||||
PLUGIN_NAME=request-block make build
|
||||
INNER_PLUGIN_NAME=${PLUGIN_NAME-""}
|
||||
if [ ! -n "$INNER_PLUGIN_NAME" ]; then
|
||||
EXTENSIONS_DIR=$(pwd)"/extensions/"
|
||||
echo "build all wasmplugins under folder of $EXTENSIONS_DIR"
|
||||
for file in `ls $EXTENSIONS_DIR`
|
||||
do
|
||||
if [ -d $EXTENSIONS_DIR$file ]; then
|
||||
name=${file##*/}
|
||||
echo "build wasmplugin name of $name"
|
||||
PLUGIN_NAME=${name} make build
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo "build wasmplugin name of $INNER_PLUGIN_NAME"
|
||||
PLUGIN_NAME=${INNER_PLUGIN_NAME} make build
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user