-
Notifications
You must be signed in to change notification settings - Fork 74
v0.2.54..v0.2.55 changeset RenderDbTranslationTest.sh
Garret Voltz edited this page Aug 14, 2020
·
1 revision
diff --git a/test-files/cmd/slow/RenderDbTranslationTest.sh b/test-files/cmd/slow/RenderDbTranslationTest.sh
new file mode 100755
index 0000000..403aa2c
--- /dev/null
+++ b/test-files/cmd/slow/RenderDbTranslationTest.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+set -e
+
+IN=test-files/renderDb.osm
+OUT=test-output/cmd/slow/translation/RenderDb
+
+function compareFiles {
+ hoot diff -C Testing.conf $1 $2 || diff $1 $2
+}
+
+# CONFIG="-C Testing.conf"
+CONFIG="-C NodeExport.conf"
+
+# LOTS of debug output
+#CONFIG="-D ogr.debug.dumptags=true -D ogr.debug.lookupcolumn=true -D ogr.debug.lookupclash=true -D ogr.debug.dumpvalidate=true"
+
+mkdir -p $(dirname ${OUT})
+rm -rf "${OUT}_in.osm" "${OUT}_out.osm"
+
+
+hoot convert \
+ $CONFIG \
+ -D schema.translation.direction=toogr \
+ -D convert.ops=hoot::SchemaTranslationVisitor \
+ -D schema.translation.script=$HOOT_HOME/translations/RenderDb.js \
+ ${IN} \
+ "${OUT}_out.osm"
+
+hoot convert \
+ $CONFIG \
+ -D schema.translation.direction=toosm \
+ -D convert.ops=hoot::SchemaTranslationVisitor \
+ -D schema.translation.script=$HOOT_HOME/translations/RenderDb.js \
+ "${OUT}_out.osm" \
+ "${OUT}_in.osm"
+
+#echo $IN $OUT
+compareFiles "${OUT}_in.osm" ${IN}