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
1 changed files with 1 additions and 1 deletions

View File

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