Skip to content

v0.2.47..v0.2.48 changeset DiffConflateCmdTest.sh

Garret Voltz edited this page Sep 27, 2019 · 1 revision
diff --git a/test-files/cmd/slow/DiffConflateCmdTest.sh b/test-files/cmd/slow/DiffConflateCmdTest.sh
index 938383d..60ce82f 100755
--- a/test-files/cmd/slow/DiffConflateCmdTest.sh
+++ b/test-files/cmd/slow/DiffConflateCmdTest.sh
@@ -5,34 +5,39 @@ mkdir -p $HOOT_HOME/tmp/
 INPUT_DIR=test-files/cmd/slow/DiffConflateCmdTest
 OUTPUT_DIR=test-output/cmd/slow/DiffConflateCmdTest
 mkdir -p $OUTPUT_DIR
+LOG_LEVEL=--warn
 
 # Run differential conflation to produce a map output
-hoot conflate -C Testing.conf --warn -C DifferentialConflation.conf -C NetworkAlgorithm.conf \
+echo "Running diff..."
+hoot conflate -C Testing.conf $LOG_LEVEL -C DifferentialConflation.conf -C NetworkAlgorithm.conf \
  $INPUT_DIR/input1.osm $INPUT_DIR/input2.osm \
  $OUTPUT_DIR/output.osm --differential
 
 # Run changeset w/tags to produce a unified changeset output (geometry and tags)
-hoot conflate -C Testing.conf --warn -C DifferentialConflation.conf -C NetworkAlgorithm.conf \
+echo "Running diff changeset with tags..."
+hoot conflate -C Testing.conf $LOG_LEVEL -C DifferentialConflation.conf -C NetworkAlgorithm.conf \
  $INPUT_DIR/input1.osm $INPUT_DIR/input2.osm \
  $OUTPUT_DIR/output_unified.osc --differential --include-tags
 
 # Run changeset w/tags to produce a unified map (osm) output
-hoot conflate -C Testing.conf --warn -C DifferentialConflation.conf -C NetworkAlgorithm.conf \
+echo "Running diff with tags..."
+hoot conflate -C Testing.conf $LOG_LEVEL -C DifferentialConflation.conf -C NetworkAlgorithm.conf \
  $INPUT_DIR/input1.osm $INPUT_DIR/input2.osm \
  $OUTPUT_DIR/output_unified.osm --differential --include-tags
 
 # Run changeset w/tags to produce separate outputs for geometry and tags
-hoot conflate -C Testing.conf --warn -C DifferentialConflation.conf -C NetworkAlgorithm.conf \
+echo "Running diff changeset with tags, separate outputs..."
+hoot conflate -C Testing.conf $LOG_LEVEL -C DifferentialConflation.conf -C NetworkAlgorithm.conf \
  $INPUT_DIR/input1.osm $INPUT_DIR/input2.osm \
  $OUTPUT_DIR/output.osc --differential --include-tags --separate-output
 
 # Check differential output
-echo "Checking differential output"
-hoot diff -C Testing.conf --warn $OUTPUT_DIR/output.osm $INPUT_DIR/output.osm || \
+echo "Checking differential output..."
+hoot diff -C Testing.conf $LOG_LEVEL $OUTPUT_DIR/output.osm $INPUT_DIR/output.osm || \
      diff $OUTPUT_DIR/output.osm $INPUT_DIR/output.osm
 
 # Check changeset output
-echo "Checking Changeset"
+echo "Checking Changeset..."
 if diff $OUTPUT_DIR/output.osc $INPUT_DIR/output.osc >/dev/null ; then
   echo "Changeset Files Match"
 else
@@ -50,7 +55,7 @@ else
 fi
 
 # Check unified changeset output
-echo "Checking unified geometry+tag diff changeset"
+echo "Checking unified geometry+tag diff changeset..."
 if diff $OUTPUT_DIR/output_unified.osc $INPUT_DIR/output_unified.osc >/dev/null ; then
   echo "Unified Changeset Files Match"
 else
@@ -59,32 +64,29 @@ else
 fi
 
 # Check unified osm output
-echo "Checking unified geometry+tag diff osm"
-hoot diff -C Testing.conf --warn $OUTPUT_DIR/output_unified.osm $INPUT_DIR/output_unified.osm || \
+echo "Checking unified geometry+tag diff osm..."
+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 to make sure we don't bomb out on empty files
-hoot conflate -C Testing.conf -C DifferentialConflation.conf -C NetworkAlgorithm.conf --warn test-files/Empty.osm test-files/Empty.osm tmp/DiffConflateCmdTest.osm
+echo "Checking conflation of empty files..."
+hoot conflate $LOG_LEVEL -C Testing.conf -C DifferentialConflation.conf -C NetworkAlgorithm.conf --warn test-files/Empty.osm test-files/Empty.osm tmp/DiffConflateCmdTest.osm
 hoot diff -C Testing.conf test-files/Empty.osm tmp/DiffConflateCmdTest.osm || cat tmp/DiffConflateCmdTest.osm
 
 # Run with the road snapper
-hoot conflate -C Testing.conf --warn -C DifferentialConflation.conf -C NetworkAlgorithm.conf \
+echo "Checking conflation with road snapping..."
+hoot conflate -C Testing.conf $LOG_LEVEL -C DifferentialConflation.conf -C NetworkAlgorithm.conf \
  -D differential.snap.unconnected.roads=true \
- -D snap.unconnected.ways.snap.to.way.criterion=hoot::HighwayCriterion \
- -D snap.unconnected.ways.snap.to.way.node.criterion=hoot::HighwayNodeCriterion \
- -D snap.unconnected.ways.snap.way.criterion=hoot::HighwayCriterion -D snap.unconnected.ways.snap.way.status=Input2 \
  $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 || \
      diff $OUTPUT_DIR/snapped-output.osm $INPUT_DIR/snapped-output.osm
 
 # Run with the road snapper and keep the ref data
-hoot conflate -C Testing.conf --warn -C DifferentialConflation.conf -C NetworkAlgorithm.conf \
+echo "Checking conflation with road snapping and keeping ref data..."
+hoot conflate -C Testing.conf $LOG_LEVEL -C DifferentialConflation.conf -C NetworkAlgorithm.conf \
  -D differential.snap.unconnected.roads=true -D differential.remove.reference.data=false \
- -D snap.unconnected.ways.snap.to.way.criterion=hoot::HighwayCriterion \
- -D snap.unconnected.ways.snap.to.way.node.criterion=hoot::HighwayNodeCriterion \
- -D snap.unconnected.ways.snap.way.criterion=hoot::HighwayCriterion -D snap.unconnected.ways.snap.way.status=Input2 \
  $INPUT_DIR/input3.osm $INPUT_DIR/input4.osm \
  $OUTPUT_DIR/snapped-with-ref-output.osm --differential
-hoot diff -C Testing.conf --warn $OUTPUT_DIR/snapped-with-ref-output.osm $INPUT_DIR/snapped-with-ref-output.osm || \
+hoot diff -C Testing.conf $LOG_LEVEL $OUTPUT_DIR/snapped-with-ref-output.osm $INPUT_DIR/snapped-with-ref-output.osm || \
      diff $OUTPUT_DIR/snapped-with-ref-output.osm $INPUT_DIR/snapped-with-ref-output.osm
Clone this wiki locally