diff options
author | Vadim Popov <vadim.popov@pelagicore.com> | 2017-04-05 11:00:23 +0200 |
---|---|---|
committer | Vadim Popov <vadim.popov@pelagicore.com> | 2017-04-06 08:04:03 +0000 |
commit | 13409710ccf27e36c3ff3e6dcce01799859386f7 (patch) | |
tree | 69355945b007b354982e05c5cc03a5427871a847 /tests | |
parent | d1deb4cac7211a4421c36ba0f153f5029be4b127 (diff) | |
download | qtivi-13409710ccf27e36c3ff3e6dcce01799859386f7.tar.gz |
Extension of autotest.sh for the backend simulator generation
When everything is in place this script will be no longer needed,
but until then some way of sanity check won't hurt.
Task-number: QTAUTO-292
Change-Id: I0ce1efd31038a299fd33b54b321926636451bd0c
Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/manual/qface/autotest.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/manual/qface/autotest.sh b/tests/manual/qface/autotest.sh index e2934c9..959a413 100755 --- a/tests/manual/qface/autotest.sh +++ b/tests/manual/qface/autotest.sh @@ -45,6 +45,16 @@ die() { exit ${2} } +checkFileCount() { + if [ "$#" -eq 3 ]; then + FILECOUNT=$(find "." -type f -name "${3}" | wc -l) + else + FILECOUNT=$(find "." -type f | wc -l) + fi + echo "${1} generated: " ${FILECOUNT} + test ${FILECOUNT} -eq ${2} || die "Not a correct number of files (${2} expected)" 1 +} + WORKDIR=$(dirname $0) GENERATOR=${WORKDIR}/../../../src/ivicore/qface/generate.py test -x ${GENERATOR} || die "${GENERATOR} does not exists or can't be executed" 1 @@ -63,4 +73,24 @@ do popd echo "Done '$idlfile' ================" done + +for idlfile in org.example.echo org.example.echo.noprivate +do + echo "Testing '$idlfile' backend-simulator ================" + idldir=$(echo $idlfile | tr . -) + bdir=${WORKDIR}/projects/${idldir}/backend-simulator + /bin/rm -rf ${bdir} + mkdir -p ${bdir} + + ${GENERATOR} --format=backend_simulator ${WORKDIR}/${idlfile}.qface ${bdir} || die "Generator failed" 1 + + pushd ${bdir} + checkFileCount "Total files" 8 + checkFileCount "Plugins" 1 "*plugin.*" + checkFileCount "Backends" 4 "*backend.*" + popd + + echo "Done '$idlfile' ================" +done + die "All OK" 0 |