From 19fcec84d8d7d21e796c7624e521b60d28ee21ed Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:45:59 +0200 Subject: Adding upstream version 16.2.11+ds. Signed-off-by: Daniel Baumann --- .../thrift/lib/nodets/test/testAll.sh | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100755 src/jaegertracing/thrift/lib/nodets/test/testAll.sh (limited to 'src/jaegertracing/thrift/lib/nodets/test/testAll.sh') diff --git a/src/jaegertracing/thrift/lib/nodets/test/testAll.sh b/src/jaegertracing/thrift/lib/nodets/test/testAll.sh new file mode 100755 index 000000000..3be12c362 --- /dev/null +++ b/src/jaegertracing/thrift/lib/nodets/test/testAll.sh @@ -0,0 +1,42 @@ +#! /bin/sh + +DIR="$( cd "$( dirname "$0" )" && pwd )" + +mkdir -p $DIR/../test-compiled + +COMPILEDDIR="$(cd $DIR && cd ../test-compiled && pwd)" +export NODE_PATH="${DIR}:${DIR}/../../nodejs/lib:${NODE_PATH}" + +compile() +{ + #generating thrift code + ${DIR}/../../../compiler/cpp/thrift -o ${DIR} --gen js:node,ts ${DIR}/../../../test/ThriftTest.thrift + ${DIR}/../../../compiler/cpp/thrift -o ${DIR} --gen js:node,ts ${DIR}/../../../test/Int64Test.thrift + ${DIR}/../../../compiler/cpp/thrift -o ${COMPILEDDIR} --gen js:node,ts ${DIR}/../../../test/ThriftTest.thrift + ${DIR}/../../../compiler/cpp/thrift -o ${COMPILEDDIR} --gen js:node,ts ${DIR}/../../../test/Int64Test.thrift + + tsc --outDir $COMPILEDDIR --project $DIR/tsconfig.json +} +compile + +testServer() +{ + echo "start server $1" + RET=0 + node ${COMPILEDDIR}/server.js $1 & + SERVERPID=$! + sleep 1 + echo "start client $1" + node ${COMPILEDDIR}/client.js $1 || RET=1 + kill -2 $SERVERPID || RET=1 + return $RET +} + +node ${COMPILEDDIR}/int64.test.js || TESTOK=1 + +#integration tests + +testServer || TESTOK=1 +testServer --promise || TESTOK=1 + +exit $TESTOK -- cgit v1.2.3