Update convert-tests.sh

This commit is contained in:
Tom M 2021-06-14 22:48:36 +02:00 committed by GitHub
parent 8023bc9dd6
commit 807e5c27ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,7 +18,7 @@ rm -f test-names.txt
mkdir -p app/src/main/cpp/tests/
for f in `grep -lR "int main(void)" ../test/ | sort` ; do
export TESTMAINNAME=`echo $f | sed -E "s/\.\.\/test\/test_\(.*\).c$/\1/"`
export TESTMAINNAME=`echo $f | sed -e "s/\.\.\/test\/*test_\(.*\).c$/\1/"`
echo $TESTMAINNAME >> test-names.txt
export OUTPUTFILE=app/src/main/cpp/tests/test_${TESTMAINNAME}.c
sed -e "s/int main(void)/int "$TESTMAINNAME"_main(void)/" $f > $OUTPUTFILE ;