-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add extra test script and initial extra-regions file to spot-check sp…
- Loading branch information
1 parent
6ecd973
commit 631e8b9
Showing
4 changed files
with
91 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
echo "Running PgOSM-Flex extra region loads" | ||
|
||
set -e | ||
|
||
if [ -z $PGOSM_CONN ]; then | ||
PGOSM_CONN=pgosm_tests | ||
else | ||
PGOSM_CONN=$PGOSM_CONN | ||
fi | ||
|
||
if [ -z $PGOSM_CONN_PG ]; then | ||
PGOSM_CONN_PG=postgres | ||
else | ||
PGOSM_CONN_PG=$PGOSM_CONN_PG | ||
fi | ||
|
||
DATA_PATH=data/extra-regions | ||
|
||
for filename in ${DATA_PATH}/*.osm.pbf; do | ||
#file_base=$(basename "${filename}" .osm.pbf) | ||
#echo $file_base | ||
echo $filename | ||
|
||
echo 'Dropping test DB pgosm_tests' | ||
psql -d $PGOSM_CONN_PG -c "DROP DATABASE pgosm_tests;" || true | ||
|
||
echo 'Creating test DB pgosm_tests' | ||
psql -d $PGOSM_CONN_PG -c "CREATE DATABASE pgosm_tests;" | ||
psql -d $PGOSM_CONN -c "CREATE EXTENSION postgis; CREATE SCHEMA osm;" | ||
|
||
original_dir=$PWD | ||
echo $original_dir | ||
|
||
cd ../flex-config | ||
osm2pgsql --slim --drop -d ${PGOSM_CONN} \ | ||
--output=flex --style=run-all.lua \ | ||
../tests/${filename} | ||
|
||
cd $original_dir | ||
|
||
done | ||
|
File renamed without changes.