aboutsummaryrefslogtreecommitdiff
path: root/test/emit_test/emit_test.sh
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2023-07-16 02:03:33 +0200
committerToni Uhlig <matzeton@googlemail.com>2023-07-16 02:03:33 +0200
commit5a40295c4cf0af5ea8da9ced04a4ce7d3621a080 (patch)
treecb21506e7b04d10b45d6066a0ee1655563d5d52b /test/emit_test/emit_test.sh
Squashed 'flatcc/' content from commit 473da2a
git-subtree-dir: flatcc git-subtree-split: 473da2afa5ca435363f8c5e6569167aee6bc31c5
Diffstat (limited to 'test/emit_test/emit_test.sh')
-rwxr-xr-xtest/emit_test/emit_test.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/emit_test/emit_test.sh b/test/emit_test/emit_test.sh
new file mode 100755
index 0000000..addecfc
--- /dev/null
+++ b/test/emit_test/emit_test.sh
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+
+set -e
+cd `dirname $0`/../..
+ROOT=`pwd`
+TMP=build/tmp/test
+${ROOT}/scripts/build.sh
+
+mkdir -p ${TMP}/emit_test
+rm -rf ${TMP}/emit_test/*
+bin/flatcc -a -o ${TMP}/emit_test test/emit_test/emit_test.fbs \
+ test/monster_test/monster_test.fbs
+cp test/emit_test/*.c ${TMP}/emit_test
+cd ${TMP}/emit_test
+cc -g -I ${ROOT}/include emit_test.c \
+ ${ROOT}/lib/libflatccrt.a -o emit_test_d
+echo "running emit test"
+./emit_test_d
+