Skip to content

Commit 316c659

Browse files
committed
<fix>(CI): add sm scene CI.
1 parent fed32fd commit 316c659

File tree

3 files changed

+20
-13
lines changed

3 files changed

+20
-13
lines changed

.ci/ci_check.sh

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,20 @@ prepare_environment()
7171
cp -r src/test/resources/ecdsa/abi src/integration-test/resources/abi
7272
cp -r src/test/resources/ecdsa/bin src/integration-test/resources/bin
7373

74-
# sed_cmd=$(get_sed_cmd)
75-
# local node_type="${1}"
76-
# if [ "${node_type}" == "sm" ];then
77-
# rm -rf src/integration-test/resources/abi
78-
# rm -rf src/integration-test/resources/bin
79-
# cp -r src/test/resources/gm/abi src/integration-test/resources/abi
80-
# cp -r src/test/resources/gm/bin src/integration-test/resources/bin
81-
# ${sed_cmd} 's/useSMCrypto = "false"/useSMCrypto = "true"/g' src/integration-test/resources/config.toml
82-
# fi
74+
sed_cmd=$(get_sed_cmd)
75+
local node_type="${1}"
76+
local use_sm="false"
77+
if [ "${node_type}" == "sm" ];then
78+
use_sm="true"
79+
rm -rf src/integration-test/resources/abi
80+
rm -rf src/integration-test/resources/bin
81+
cp -r src/test/resources/gm/abi src/integration-test/resources/abi
82+
cp -r src/test/resources/gm/bin src/integration-test/resources/bin
83+
fi
84+
use_sm_str="useSMCrypto = \"${use_sm}\""
85+
${sed_cmd} "s/useSMCrypto = \"false\"/${use_sm_str}/g" ./src/integration-test/resources/config.toml
86+
${sed_cmd} "s/useSMCrypto = \"false\"/${use_sm_str}/g" ./src/integration-test/resources/amop/config-subscriber-for-test.toml
87+
${sed_cmd} "s/useSMCrypto = \"false\"/${use_sm_str}/g" ./src/integration-test/resources/amop/config-publisher-for-test.toml
8388
}
8489

8590
prepare_wasm_environment()
@@ -120,8 +125,8 @@ clean_node()
120125
# check integration-test for non-gm node
121126
check_standard_node()
122127
{
123-
build_node "normal" "${2}"
124-
prepare_environment
128+
build_node "normal" "${3}"
129+
prepare_environment "${2}"
125130
## run integration test
126131
bash gradlew clean integrationTest --info
127132
## clean
@@ -130,7 +135,7 @@ check_standard_node()
130135

131136
check_wasm_node()
132137
{
133-
build_node "wasm" "${2}"
138+
build_node "wasm" "${3}"
134139
prepare_wasm_environment
135140
## run integration test
136141
bash gradlew clean integrationWasmTest --info
@@ -146,7 +151,7 @@ LOG_INFO "------ download_build_chain: v3.2.0---------"
146151
download_binary "v3.2.0"
147152
download_build_chain "v3.2.0"
148153
LOG_INFO "------ check_standard_node---------"
149-
check_standard_node "false"
154+
check_standard_node "false" "sm"
150155
LOG_INFO "------ check_wasm_node---------"
151156
check_wasm_node "true"
152157
LOG_INFO "------ check_basic---------"

src/integration-test/resources/amop/config-publisher-for-test.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
[cryptoMaterial]
44
certPath = "conf"
5+
useSMCrypto = "false"
56
# CA cert file path
67
# caCert = "conf/ca.crt"
78
# SSL cert file path

src/integration-test/resources/amop/config-subscriber-for-test.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
[cryptoMaterial]
44
certPath = "conf"
5+
useSMCrypto = "false"
56
# CA cert file path
67
# caCert = "conf/ca.crt"
78
# SSL cert file path

0 commit comments

Comments
 (0)