feat: support only build one plugin to testing specified WasmPlugin (#371)

Co-authored-by: 澄潭 <zty98751@alibaba-inc.com>
This commit is contained in:
Hinsteny Hisoka
2023-06-15 15:21:54 +08:00
committed by GitHub
parent f9ffda288b
commit ec6a185adc
2 changed files with 17 additions and 3 deletions

View File

@@ -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:

View File

@@ -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