Revert "test: commit generated test files to remove osmosis dependency for tests"
Timestamps of files are all the same after git clone, so make will rebuild test files anyway. This reverts commit 39d090d44e2f05e08a4edeab707fa9195b63f57a.master
parent
a4ec5ffea1
commit
2817cee1bd
|
@ -50,6 +50,7 @@ addons:
|
|||
# https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-trusty
|
||||
packages:
|
||||
- postgresql-9.5-postgis-2.3
|
||||
- osmosis
|
||||
- chrpath
|
||||
|
||||
before_script:
|
||||
|
|
|
@ -9,15 +9,17 @@ endif
|
|||
all: test
|
||||
|
||||
clean:
|
||||
rm generated/*.{pbf,gz}
|
||||
rm -rf build
|
||||
|
||||
PBF_FILES=$(addprefix generated/,$(patsubst %.osm,%.pbf,$(wildcard *.osm)))
|
||||
OSCGZ_FILES=$(addprefix generated/,$(patsubst %.osc,%.osc.gz,$(wildcard *.osc)))
|
||||
PBF_FILES=$(addprefix build/,$(patsubst %.osm,%.pbf,$(wildcard *.osm)))
|
||||
OSCGZ_FILES=$(addprefix build/,$(patsubst %.osc,%.osc.gz,$(wildcard *.osc)))
|
||||
|
||||
generated/%.pbf: %.osm
|
||||
build/%.pbf: %.osm
|
||||
@mkdir -p build
|
||||
osmosis --read-xml $< --sort type="TypeThenId" --write-pbf $@ omitmetadata=true
|
||||
|
||||
generated/%.osc.gz: %.osc
|
||||
build/%.osc.gz: %.osc
|
||||
@mkdir -p build
|
||||
gzip --stdout $< > $@
|
||||
|
||||
files: $(PBF_FILES) $(OSCGZ_FILES)
|
||||
|
|
|
@ -20,7 +20,7 @@ func TestAnyAny_Prepare(t *testing.T) {
|
|||
ts.config = importConfig{
|
||||
connection: "postgis://",
|
||||
cacheDir: ts.dir,
|
||||
osmFileName: "generated/any_any.pbf",
|
||||
osmFileName: "build/any_any.pbf",
|
||||
mappingFileName: "any_any_mapping.json",
|
||||
}
|
||||
ts.g = geos.NewGeos()
|
||||
|
|
|
@ -29,7 +29,7 @@ func TestComplete_Prepare(t *testing.T) {
|
|||
ts.config = importConfig{
|
||||
connection: "postgis://",
|
||||
cacheDir: ts.dir,
|
||||
osmFileName: "generated/complete_db.pbf",
|
||||
osmFileName: "build/complete_db.pbf",
|
||||
mappingFileName: "complete_db_mapping.json",
|
||||
}
|
||||
ts.g = geos.NewGeos()
|
||||
|
@ -400,7 +400,7 @@ func TestComplete_HstoreTags(t *testing.T) {
|
|||
// #######################################################################
|
||||
|
||||
func TestComplete_Update(t *testing.T) {
|
||||
ts.updateOsm(t, "./generated/complete_db.osc.gz")
|
||||
ts.updateOsm(t, "./build/complete_db.osc.gz")
|
||||
}
|
||||
|
||||
// #######################################################################
|
||||
|
|
|
@ -24,7 +24,7 @@ func TestExpireTiles_Prepare(t *testing.T) {
|
|||
ts.config = importConfig{
|
||||
connection: "postgis://",
|
||||
cacheDir: ts.dir,
|
||||
osmFileName: "generated/expire_tiles.pbf",
|
||||
osmFileName: "build/expire_tiles.pbf",
|
||||
mappingFileName: "expire_tiles_mapping.yml",
|
||||
expireTileDir: filepath.Join(ts.dir, "expiretiles"),
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ func TestExpireTiles_Elements(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestExpireTiles_Update(t *testing.T) {
|
||||
ts.updateOsm(t, "generated/expire_tiles.osc.gz")
|
||||
ts.updateOsm(t, "build/expire_tiles.osc.gz")
|
||||
}
|
||||
|
||||
func TestExpireTiles_CheckExpireFile(t *testing.T) {
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
Files in this directory are generated by `make files` in ./test by calling osmosis and gzip.
|
||||
The sources for these files are in ./test.
|
||||
|
||||
Generated files need to be commited in separate commit! Otherwise source and
|
||||
generated file will have the same mtime when checked out from git and make will
|
||||
try to regenerate the file.
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -20,7 +20,7 @@ func TestRouteRelation_Prepare(t *testing.T) {
|
|||
ts.config = importConfig{
|
||||
connection: "postgis://",
|
||||
cacheDir: ts.dir,
|
||||
osmFileName: "generated/route_relation.pbf",
|
||||
osmFileName: "build/route_relation.pbf",
|
||||
mappingFileName: "route_relation_mapping.yml",
|
||||
}
|
||||
ts.g = geos.NewGeos()
|
||||
|
@ -107,7 +107,7 @@ func TestRouteRelation_NoRouteWithMissingMember(t *testing.T) {
|
|||
// #######################################################################
|
||||
|
||||
func TestRouteRelation_Update(t *testing.T) {
|
||||
ts.updateOsm(t, "./generated/route_relation.osc.gz")
|
||||
ts.updateOsm(t, "./build/route_relation.osc.gz")
|
||||
}
|
||||
|
||||
// #######################################################################
|
||||
|
|
|
@ -23,7 +23,7 @@ func TestSingleTable_Prepare(t *testing.T) {
|
|||
ts.config = importConfig{
|
||||
connection: "postgis://",
|
||||
cacheDir: ts.dir,
|
||||
osmFileName: "generated/single_table.pbf",
|
||||
osmFileName: "build/single_table.pbf",
|
||||
mappingFileName: "single_table_mapping.json",
|
||||
}
|
||||
ts.g = geos.NewGeos()
|
||||
|
@ -167,7 +167,7 @@ func TestSingleTable_DuplicateIds1(t *testing.T) {
|
|||
// #######################################################################
|
||||
|
||||
func TestSingleTable_Update(t *testing.T) {
|
||||
ts.updateOsm(t, "./generated/single_table.osc.gz")
|
||||
ts.updateOsm(t, "./build/single_table.osc.gz")
|
||||
}
|
||||
|
||||
// #######################################################################
|
||||
|
|
Loading…
Reference in New Issue