Skip to content

v0.2.54..v0.2.55 changeset DiffConflateCmdTest.sh

Garret Voltz edited this page Aug 14, 2020 · 1 revision
diff --git a/test-files/cmd/slow/DiffConflateCmdTest.sh b/test-files/cmd/slow/DiffConflateCmdTest.sh
index ee84a5d..affebf7 100755
--- a/test-files/cmd/slow/DiffConflateCmdTest.sh
+++ b/test-files/cmd/slow/DiffConflateCmdTest.sh
@@ -21,7 +21,11 @@ echo "Running diff changeset with tags..."
 echo ""
 hoot conflate $LOG_LEVEL -C DifferentialConflation.conf -C NetworkAlgorithm.conf -C Testing.conf  \
  $INPUT_DIR/input1.osm $INPUT_DIR/input2.osm \
- $OUTPUT_DIR/output_unified.osc --differential --include-tags
+ $OUTPUT_DIR/output_unified.osc --differential --include-tags --changeset-stats $OUTPUT_DIR/output_unified_changeset_stats.json
+# Check command line display of stats
+hoot conflate $LOG_LEVEL -C DifferentialConflation.conf -C NetworkAlgorithm.conf -C Testing.conf  \
+ $INPUT_DIR/input1.osm $INPUT_DIR/input2.osm \
+ $OUTPUT_DIR/output_unified.osc --differential --include-tags --changeset-stats
 
 # Run changeset w/tags to produce a unified map (osm) output
 echo ""
@@ -37,7 +41,11 @@ echo "Running diff changeset with tags, separate outputs..."
 echo ""
 hoot conflate $LOG_LEVEL -C DifferentialConflation.conf -C NetworkAlgorithm.conf -C Testing.conf \
  $INPUT_DIR/input1.osm $INPUT_DIR/input2.osm \
- $OUTPUT_DIR/output.osc --differential --include-tags --separate-output
+ $OUTPUT_DIR/output.osc --differential --include-tags --changeset-stats $OUTPUT_DIR/output_changeset_stats.json --separate-output
+# Check command line display of stats
+hoot conflate $LOG_LEVEL -C DifferentialConflation.conf -C NetworkAlgorithm.conf -C Testing.conf \
+ $INPUT_DIR/input1.osm $INPUT_DIR/input2.osm \
+ $OUTPUT_DIR/output.osc --differential --include-tags --changeset-stats --separate-output
 
 # Check differential output
 echo ""
@@ -98,6 +106,36 @@ echo ""
 hoot diff -C Testing.conf $LOG_LEVEL $OUTPUT_DIR/output_unified.osm $INPUT_DIR/output_unified.osm || \
      diff $OUTPUT_DIR/output_unified.osm $INPUT_DIR/output_unified.osm
 
+# Check unified changeset stats output
+echo ""
+echo "Checking Unified Changeset Stats..."
+echo ""
+if diff $OUTPUT_DIR/output_unified_changeset_stats.json $INPUT_DIR/output_unified_changeset_stats.json >/dev/null ; then
+  echo ""
+  echo "Changeset Stats Files Match"
+  echo ""
+else
+  echo ""
+  echo "Changeset Stats Files Don't Match"
+  echo ""
+  diff $OUTPUT_DIR/output_unified_changeset_stats.json t$INPUT_DIR/output_unified_changeset_stats.json
+fi
+
+# Check changeset stats output
+echo ""
+echo "Checking Changeset Stats..."
+echo ""
+if diff $OUTPUT_DIR/output_changeset_stats.json $INPUT_DIR/output_changeset_stats.json >/dev/null ; then
+  echo ""
+  echo "Changeset Stats Files Match"
+  echo ""
+else
+  echo ""
+  echo "Changeset Stats Files Don't Match"
+  echo ""
+  diff $OUTPUT_DIR/output_changeset_stats.json t$INPUT_DIR/output_changeset_stats.json
+fi
+
 # Check to make sure we don't bomb out on empty files
 echo ""
 echo "Checking conflation of empty files..."
@@ -110,7 +148,7 @@ echo ""
 echo "Checking conflation with road snapping..."
 echo ""
 hoot conflate $LOG_LEVEL -C DifferentialConflation.conf -C NetworkAlgorithm.conf -C Testing.conf \
- -D differential.snap.unconnected.roads=true \
+ -D match.creators=hoot::NetworkMatchCreator -D merger.creators=hoot::NetworkMergerCreator -D differential.snap.unconnected.roads=true \
  $INPUT_DIR/input3.osm $INPUT_DIR/input4.osm \
  $OUTPUT_DIR/snapped-output.osm --differential
 hoot diff -C Testing.conf --warn $OUTPUT_DIR/snapped-output.osm $INPUT_DIR/snapped-output.osm || \
@@ -121,7 +159,8 @@ echo ""
 echo "Checking conflation with road snapping and keeping ref data..."
 echo ""
 hoot conflate $LOG_LEVEL -C DifferentialConflation.conf -C NetworkAlgorithm.conf -C Testing.conf \
- -D differential.snap.unconnected.roads=true -D differential.remove.reference.data=false \
+ -D match.creators=hoot::NetworkMatchCreator -D merger.creators=hoot::NetworkMergerCreator -D differential.snap.unconnected.roads=true \
+ -D differential.remove.reference.data=false \
  $INPUT_DIR/input3.osm $INPUT_DIR/input4.osm \
  $OUTPUT_DIR/snapped-with-ref-output.osm --differential
 hoot diff -C Testing.conf $LOG_LEVEL $OUTPUT_DIR/snapped-with-ref-output.osm $INPUT_DIR/snapped-with-ref-output.osm || \
Clone this wiki locally