From 28ee126baa2dea7e28b606196535f56a76be8b65 Mon Sep 17 00:00:00 2001 From: Michael Bell Date: Tue, 21 Sep 2021 20:10:11 +0100 Subject: [PATCH 1/2] Fix test cache to consider MLD executable changes Currently the test cache is not invalidated if changes to osrm-partition or osrm-customize executables. This is problematic when these executables make breaking changes to the data format. We fix this by including both in the list of executables that can invalidate the test cache. --- CHANGELOG.md | 1 + features/support/cache.js | 7 +++++-- features/support/env.js | 7 +++++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ece71157099..6416e0c8efb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Build: - CHANGED: Replace Travis with Github Actions for CI builds [#6071](https://github.com/Project-OSRM/osrm-backend/pull/6071) - FIXED: Fixed Boost link flags in pkg-config file. [#6083](https://github.com/Project-OSRM/osrm-backend/pull/6083) + - FIXED: Fixed test cache to consider MLD executable changes. [#6129](https://github.com/Project-OSRM/osrm-backend/pull/6129) - Routing: - FIXED: Fix generation of inefficient MLD partitions [#6084](https://github.com/Project-OSRM/osrm-backend/pull/6084) - FIXED: Fix MLD level mask generation to support 64-bit masks. [#6123](https://github.com/Project-OSRM/osrm-backend/pull/6123) diff --git a/features/support/cache.js b/features/support/cache.js index 2d9f99239a2..ccf6a85689d 100644 --- a/features/support/cache.js +++ b/features/support/cache.js @@ -114,9 +114,12 @@ module.exports = function() { let dependencies = [ this.OSRM_EXTRACT_PATH, this.OSRM_CONTRACT_PATH, + this.OSRM_CUSTOMIZE_PATH, + this.OSRM_PARTITION_PATH, this.LIB_OSRM_EXTRACT_PATH, - this.LIB_OSRM_GUIDANCE_PATH, - this.LIB_OSRM_CONTRACT_PATH + this.LIB_OSRM_CONTRACT_PATH, + this.LIB_OSRM_CUSTOMIZE_PATH, + this.LIB_OSRM_PARTITION_PATH ]; var addLuaFiles = (directory, callback) => { diff --git a/features/support/env.js b/features/support/env.js index 9b4c5acc959..95ddf3370c3 100644 --- a/features/support/env.js +++ b/features/support/env.js @@ -67,10 +67,13 @@ module.exports = function () { this.OSRM_EXTRACT_PATH = path.resolve(util.format('%s/%s%s', this.BIN_PATH, 'osrm-extract', this.EXE)); this.OSRM_CONTRACT_PATH = path.resolve(util.format('%s/%s%s', this.BIN_PATH, 'osrm-contract', this.EXE)); + this.OSRM_CUSTOMIZE_PATH = path.resolve(util.format('%s/%s%s', this.BIN_PATH, 'osrm-customize', this.EXE)); + this.OSRM_PARTITION_PATH = path.resolve(util.format('%s/%s%s', this.BIN_PATH, 'osrm-partition', this.EXE)); this.OSRM_ROUTED_PATH = path.resolve(util.format('%s/%s%s', this.BIN_PATH, 'osrm-routed', this.EXE)); this.LIB_OSRM_EXTRACT_PATH = util.format('%s/' + this.LIB, this.BIN_PATH, 'osrm_extract'), - this.LIB_OSRM_GUIDANCE_PATH = util.format('%s/' + this.LIB, this.BIN_PATH, 'osrm_guidance'), this.LIB_OSRM_CONTRACT_PATH = util.format('%s/' + this.LIB, this.BIN_PATH, 'osrm_contract'), + this.LIB_OSRM_CUSTOMIZE_PATH = util.format('%s/' + this.LIB, this.BIN_PATH, 'osrm_customize'), + this.LIB_OSRM_PARTITION_PATH = util.format('%s/' + this.LIB, this.BIN_PATH, 'osrm_partition'), this.LIB_OSRM_PATH = util.format('%s/' + this.LIB, this.BIN_PATH, 'osrm'); // eslint-disable-next-line no-console @@ -111,7 +114,7 @@ module.exports = function () { }; var q = d3.queue(); - [this.OSRM_EXTRACT_PATH, this.OSRM_CONTRACT_PATH, this.OSRM_ROUTED_PATH].forEach(bin => { q.defer(verify, bin); }); + [this.OSRM_EXTRACT_PATH, this.OSRM_CONTRACT_PATH, this.OSRM_CUSTOMIZE_PATH, this.OSRM_PARTITION_PATH, this.OSRM_ROUTED_PATH].forEach(bin => { q.defer(verify, bin); }); q.awaitAll(callback); }; From 5bf3c7b6597df18d16be06b073911a4b1c5bb31e Mon Sep 17 00:00:00 2001 From: Michael Bell Date: Tue, 21 Sep 2021 20:28:32 +0100 Subject: [PATCH 2/2] Executables use hyphens --- features/support/env.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/features/support/env.js b/features/support/env.js index 95ddf3370c3..1eae0ce29ba 100644 --- a/features/support/env.js +++ b/features/support/env.js @@ -70,10 +70,10 @@ module.exports = function () { this.OSRM_CUSTOMIZE_PATH = path.resolve(util.format('%s/%s%s', this.BIN_PATH, 'osrm-customize', this.EXE)); this.OSRM_PARTITION_PATH = path.resolve(util.format('%s/%s%s', this.BIN_PATH, 'osrm-partition', this.EXE)); this.OSRM_ROUTED_PATH = path.resolve(util.format('%s/%s%s', this.BIN_PATH, 'osrm-routed', this.EXE)); - this.LIB_OSRM_EXTRACT_PATH = util.format('%s/' + this.LIB, this.BIN_PATH, 'osrm_extract'), - this.LIB_OSRM_CONTRACT_PATH = util.format('%s/' + this.LIB, this.BIN_PATH, 'osrm_contract'), - this.LIB_OSRM_CUSTOMIZE_PATH = util.format('%s/' + this.LIB, this.BIN_PATH, 'osrm_customize'), - this.LIB_OSRM_PARTITION_PATH = util.format('%s/' + this.LIB, this.BIN_PATH, 'osrm_partition'), + this.LIB_OSRM_EXTRACT_PATH = util.format('%s/' + this.LIB, this.BIN_PATH, 'osrm-extract'), + this.LIB_OSRM_CONTRACT_PATH = util.format('%s/' + this.LIB, this.BIN_PATH, 'osrm-contract'), + this.LIB_OSRM_CUSTOMIZE_PATH = util.format('%s/' + this.LIB, this.BIN_PATH, 'osrm-customize'), + this.LIB_OSRM_PARTITION_PATH = util.format('%s/' + this.LIB, this.BIN_PATH, 'osrm-partition'), this.LIB_OSRM_PATH = util.format('%s/' + this.LIB, this.BIN_PATH, 'osrm'); // eslint-disable-next-line no-console