aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--afm-test.native.sh21
-rw-r--r--test/afb-test/etc/aft-aftest-selftest.json17
2 files changed, 32 insertions, 6 deletions
diff --git a/afm-test.native.sh b/afm-test.native.sh
index 04212e0..9f9d6ca 100644
--- a/afm-test.native.sh
+++ b/afm-test.native.sh
@@ -96,12 +96,29 @@ export AFT_${ENV_API}_PLUGIN_PATH
PROCNAME="afbd-$(grep -Eo 'id=".*" ' "${SERVICEPACKAGEDIR}/config.xml" | cut -d'=' -f2 | tr -d '" '| tr '[:upper:]' '[:lower:]')"
SOCKETSERVICE="/tmp/$API"
+declare -a testVerb
+
+if [[ $(jq -r '.testVerb|type' ${TESTCFGFILE}) == "array" ]]
+then
+ testVerbLength=$(jq '.testVerb|length' ${TESTCFGFILE})
+ for (( idx=0; idx<testVerbLength; idx++ )) do
+ testVerb[$idx]=$(jq -r ".testVerb[$idx].uid" ${TESTCFGFILE})
+ done
+else
+ testVerb[0]=$(jq -r ".testVerb.uid" ${TESTCFGFILE})
+fi
+
export AFT_CONFIG_PATH="${TESTPACKAGEDIR}"
export AFT_PLUGIN_PATH="${TESTPACKAGEDIR}"
LOGFILESERVICE="test-service.log"
LOGFILETEST="test.log"
+testVerbLength=${#testVerb[@]}
+for (( idx=0; idx<testVerbLength; idx++ )) do
+ testVerbCalls="--call=${TESTAPINAME}/${testVerb[$idx]}:'{}' ${testVerbCalls}"
+done
+
if [ ${MODE} = "SOLO" ]
then
pkill "${TESTPROCNAME}"
@@ -115,7 +132,7 @@ then
--workdir="${TESTPACKAGEDIR}" \
--ldpaths="${SERVICEPACKAGEDIR}" \
--binding="${AFBTEST}" \
- --call="${TESTAPINAME}/launch_all_tests:{}" \
+ $(echo -e "${testVerbCalls}") \
--call="${TESTAPINAME}/exit:{}" \
-vvv &> "${LOGFILETEST}"
elif [ ${MODE} = "SERVICE" ]
@@ -140,7 +157,7 @@ then
--workdir="${TESTPACKAGEDIR}" \
--binding="${AFBTEST}" \
--ws-client=unix:"${SOCKETSERVICE}" \
- --call="${TESTAPINAME}/launch_all_tests:{}" \
+ $(echo -e "${testVerbCalls}") \
--call="${TESTAPINAME}/exit:{}" \
-vvv &> "${LOGFILETEST}"
else
diff --git a/test/afb-test/etc/aft-aftest-selftest.json b/test/afb-test/etc/aft-aftest-selftest.json
index 5a3f1dd..7335a50 100644
--- a/test/afb-test/etc/aft-aftest-selftest.json
+++ b/test/afb-test/etc/aft-aftest-selftest.json
@@ -10,15 +10,24 @@
"low-can"
]
},
- "testVerb": {
- "uid": "launch_all_tests",
- "info": "Launch all the tests",
+ "testVerb": [{
+ "uid": "short",
+ "info": "Launch the short session of tests",
"action": "lua://AFT#_launch_test",
"args": {
"trace": "low-can",
- "files": [ "aftTest.lua", "mapi_tests.lua" ]
+ "files": "aftTest.lua"
}
},
+ {
+ "uid": "long",
+ "info": "Launch the long session of tests",
+ "action": "lua://AFT#_launch_test",
+ "args": {
+ "trace": "low-can",
+ "files": [ "aftTest.lua", "mapi_tests.lua" ]
+ }
+ }],
"mapis": [{
"uid": "low-can",
"info": "Faked low-can API",