From 7436835244ce48ec4170aa959aa222bf8c66cd8c Mon Sep 17 00:00:00 2001 From: Dennis Luxen Date: Wed, 10 Jul 2024 16:28:07 +0200 Subject: [PATCH] Remove corech options, redundant tests (#6989) * Remove corech options, redundant tests * Small fix --- .gitignore | 1 - features/options/contract/help.feature | 44 ------------ features/options/customize/help.feature | 38 ----------- features/options/datastore/datastore.feature | 4 -- features/options/extract/help.feature | 47 ------------- features/options/partition/help.feature | 53 --------------- features/options/routed/help.feature | 71 -------------------- features/testbot/matching.feature | 16 ----- features/testbot/via.feature | 26 ------- scripts/ci/windows-build.bat | 6 -- src/tools/contract.cpp | 19 ++---- 11 files changed, 5 insertions(+), 320 deletions(-) delete mode 100644 features/options/contract/help.feature delete mode 100644 features/options/customize/help.feature delete mode 100644 features/options/extract/help.feature delete mode 100644 features/options/partition/help.feature delete mode 100644 features/options/routed/help.feature diff --git a/.gitignore b/.gitignore index 9180d6fb5..2e777a498 100644 --- a/.gitignore +++ b/.gitignore @@ -46,7 +46,6 @@ Thumbs.db /example/build/ /test/data/monaco.osrm* /test/data/ch -/test/data/corech /test/data/mld /cmake/postinst diff --git a/features/options/contract/help.feature b/features/options/contract/help.feature deleted file mode 100644 index 50269483d..000000000 --- a/features/options/contract/help.feature +++ /dev/null @@ -1,44 +0,0 @@ -@prepare @options @help -Feature: osrm-contract command line options: help - - Scenario: osrm-contract - Help should be shown when no options are passed - When I try to run "osrm-contract" - Then stderr should be empty - And stdout should contain /osrm-contract(.exe)? \[options\]:/ - And stdout should contain "Options:" - And stdout should contain "--version" - And stdout should contain "--help" - And stdout should contain "--verbosity" - And stdout should contain "Configuration:" - And stdout should contain "--threads" - And stdout should contain "--core" - And stdout should contain "--segment-speed-file" - And it should exit with an error - - Scenario: osrm-contract - Help, short - When I run "osrm-contract -h" - Then stderr should be empty - And stdout should contain /osrm-contract(.exe)? \[options\]:/ - And stdout should contain "Options:" - And stdout should contain "--version" - And stdout should contain "--help" - And stdout should contain "--verbosity" - And stdout should contain "Configuration:" - And stdout should contain "--threads" - And stdout should contain "--core" - And stdout should contain "--segment-speed-file" - And it should exit successfully - - Scenario: osrm-contract - Help, long - When I run "osrm-contract --help" - Then stderr should be empty - And stdout should contain /osrm-contract(.exe)? \[options\]:/ - And stdout should contain "Options:" - And stdout should contain "--version" - And stdout should contain "--help" - And stdout should contain "--verbosity" - And stdout should contain "Configuration:" - And stdout should contain "--threads" - And stdout should contain "--core" - And stdout should contain "--segment-speed-file" - And it should exit successfully diff --git a/features/options/customize/help.feature b/features/options/customize/help.feature deleted file mode 100644 index 02a69e4ce..000000000 --- a/features/options/customize/help.feature +++ /dev/null @@ -1,38 +0,0 @@ -@contract @options @help -Feature: osrm-customize command line options: help - - Scenario: osrm-customize - Help should be shown when no options are passed - When I try to run "osrm-customize" - Then stderr should be empty - And stdout should contain /osrm-customize(.exe)? \[options\]:/ - And stdout should contain "Options:" - And stdout should contain "--version" - And stdout should contain "--help" - And stdout should contain "--verbosity" - And stdout should contain "Configuration:" - And stdout should contain "--threads" - And it should exit with an error - - Scenario: osrm-customize - Help, short - When I run "osrm-customize -h" - Then stderr should be empty - And stdout should contain /osrm-customize(.exe)? \[options\]:/ - And stdout should contain "Options:" - And stdout should contain "--version" - And stdout should contain "--help" - And stdout should contain "--verbosity" - And stdout should contain "Configuration:" - And stdout should contain "--threads" - And it should exit successfully - - Scenario: osrm-customize - Help, long - When I run "osrm-customize --help" - Then stderr should be empty - And stdout should contain /osrm-customize(.exe)? \[options\]:/ - And stdout should contain "Options:" - And stdout should contain "--version" - And stdout should contain "--help" - And stdout should contain "--verbosity" - And stdout should contain "Configuration:" - And stdout should contain "--threads" - And it should exit successfully diff --git a/features/options/datastore/datastore.feature b/features/options/datastore/datastore.feature index 667f245a5..30d196154 100644 --- a/features/options/datastore/datastore.feature +++ b/features/options/datastore/datastore.feature @@ -33,10 +33,6 @@ Feature: osrm-datastore command line options When I try to run "osrm-datastore {processed_file} --dataset-name cucumber/only_metric_test --only-metric" Then it should exit successfully - Scenario: osrm-datastore - Displaying help should work - When I try to run "osrm-datastore {processed_file} --help" - Then it should exit successfully - Scenario: osrm-datastore - Errors on invalid path When I try to run "osrm-datastore invalid_path.osrm" Then stderr should contain "[error] Config contains invalid file paths." diff --git a/features/options/extract/help.feature b/features/options/extract/help.feature deleted file mode 100644 index 3d86115e5..000000000 --- a/features/options/extract/help.feature +++ /dev/null @@ -1,47 +0,0 @@ -@extract @options @help -Feature: osrm-extract command line options: help - - Background: - Given the profile "testbot" - - Scenario: osrm-extract - Help should be shown when no options are passed - When I run "osrm-extract" - Then stderr should be empty - And stdout should contain /osrm-extract(.exe)? \[options\]:/ - And stdout should contain "Options:" - And stdout should contain "--version" - And stdout should contain "--help" - And stdout should contain "--verbosity" - And stdout should contain "Configuration:" - And stdout should contain "--profile" - And stdout should contain "--threads" - And stdout should contain "--small-component-size" - And it should exit successfully - - Scenario: osrm-extract - Help, short - When I run "osrm-extract -h" - Then stderr should be empty - And stdout should contain /osrm-extract(.exe)? \[options\]:/ - And stdout should contain "Options:" - And stdout should contain "--version" - And stdout should contain "--help" - And stdout should contain "--verbosity" - And stdout should contain "Configuration:" - And stdout should contain "--profile" - And stdout should contain "--threads" - And stdout should contain "--small-component-size" - And it should exit successfully - - Scenario: osrm-extract - Help, long - When I run "osrm-extract --help" - Then stderr should be empty - And stdout should contain /osrm-extract(.exe)? \[options\]:/ - And stdout should contain "Options:" - And stdout should contain "--version" - And stdout should contain "--help" - And stdout should contain "--verbosity" - And stdout should contain "Configuration:" - And stdout should contain "--profile" - And stdout should contain "--threads" - And stdout should contain "--small-component-size" - And it should exit successfully diff --git a/features/options/partition/help.feature b/features/options/partition/help.feature deleted file mode 100644 index 08fb84c35..000000000 --- a/features/options/partition/help.feature +++ /dev/null @@ -1,53 +0,0 @@ -@partition @options @help -Feature: osrm-partition command line options: help - - Scenario: osrm-partition - Help should be shown when no options are passed - When I try to run "osrm-partition" - Then stderr should be empty - And stdout should contain /osrm-partition(.exe)? \[options\]:/ - And stdout should contain "Options:" - And stdout should contain "--version" - And stdout should contain "--help" - And stdout should contain "--verbosity" - And stdout should contain "Configuration:" - And stdout should contain "--threads" - And stdout should contain "--balance" - And stdout should contain "--boundary" - And stdout should contain "--optimizing-cuts" - And stdout should contain "--small-component-size" - And stdout should contain "--max-cell-sizes" - And it should exit with an error - - Scenario: osrm-partition - Help, short - When I run "osrm-partition -h" - Then stderr should be empty - And stdout should contain /osrm-partition(.exe)? \[options\]:/ - And stdout should contain "Options:" - And stdout should contain "--version" - And stdout should contain "--help" - And stdout should contain "--verbosity" - And stdout should contain "Configuration:" - And stdout should contain "--threads" - And stdout should contain "--balance" - And stdout should contain "--boundary" - And stdout should contain "--optimizing-cuts" - And stdout should contain "--small-component-size" - And stdout should contain "--max-cell-sizes" - And it should exit successfully - - Scenario: osrm-partition - Help, long - When I run "osrm-partition --help" - Then stderr should be empty - And stdout should contain /osrm-partition(.exe)? \[options\]:/ - And stdout should contain "Options:" - And stdout should contain "--version" - And stdout should contain "--help" - And stdout should contain "--verbosity" - And stdout should contain "Configuration:" - And stdout should contain "--threads" - And stdout should contain "--balance" - And stdout should contain "--boundary" - And stdout should contain "--optimizing-cuts" - And stdout should contain "--small-component-size" - And stdout should contain "--max-cell-sizes" - And it should exit successfully diff --git a/features/options/routed/help.feature b/features/options/routed/help.feature deleted file mode 100644 index fc3741078..000000000 --- a/features/options/routed/help.feature +++ /dev/null @@ -1,71 +0,0 @@ -@routed @options @help -Feature: osrm-routed command line options: help - - Background: - Given the profile "testbot" - - Scenario: osrm-routed - Help should be shown when no options are passed - When I run "osrm-routed" - Then stderr should be empty - And stdout should contain /osrm-routed(.exe)? \[\]:/ - And stdout should contain "Options:" - And stdout should contain "--version" - And stdout should contain "--help" - And stdout should contain "--verbosity" - And stdout should contain "--trial" - And stdout should contain "Configuration:" - And stdout should contain "--ip" - And stdout should contain "--port" - And stdout should contain "--threads" - And stdout should contain "--shared-memory" - And stdout should contain "--max-viaroute-size" - And stdout should contain "--max-trip-size" - And stdout should contain "--max-table-size" - And stdout should contain "--max-matching-size" - And stdout should contain "--default-radius" - And stdout should contain "--keepalive-timeout" - And it should exit successfully - - Scenario: osrm-routed - Help, short - When I run "osrm-routed -h" - Then stderr should be empty - And stdout should contain /osrm-routed(.exe)? \[\]:/ - And stdout should contain "Options:" - And stdout should contain "--version" - And stdout should contain "--help" - And stdout should contain "--verbosity" - And stdout should contain "--trial" - And stdout should contain "Configuration:" - And stdout should contain "--ip" - And stdout should contain "--port" - And stdout should contain "--threads" - And stdout should contain "--shared-memory" - And stdout should contain "--max-viaroute-size" - And stdout should contain "--max-trip-size" - And stdout should contain "--max-table-size" - And stdout should contain "--max-matching-size" - And stdout should contain "--default-radius" - And stdout should contain "--keepalive-timeout" - And it should exit successfully - - Scenario: osrm-routed - Help, long - When I run "osrm-routed --help" - Then stderr should be empty - And stdout should contain /osrm-routed(.exe)? \[\]:/ - And stdout should contain "Options:" - And stdout should contain "--version" - And stdout should contain "--help" - And stdout should contain "--verbosity" - And stdout should contain "--trial" - And stdout should contain "Configuration:" - And stdout should contain "--ip" - And stdout should contain "--port" - And stdout should contain "--threads" - And stdout should contain "--shared-memory" - And stdout should contain "--max-trip-size" - And stdout should contain "--max-table-size" - And stdout should contain "--max-table-size" - And stdout should contain "--max-matching-size" - And stdout should contain "--default-radius" - And stdout should contain "--keepalive-timeout" - And it should exit successfully diff --git a/features/testbot/matching.feature b/features/testbot/matching.feature index b9df1f3b0..1cf111472 100644 --- a/features/testbot/matching.feature +++ b/features/testbot/matching.feature @@ -136,22 +136,6 @@ Feature: Basic Map Matching | trace | matchings | | abcbd | abbd | - Scenario: Testbot - Map matching with core factor - Given the contract extra arguments "--core 0.8" - Given the node map - """ - a b c d - e - """ - - And the ways - | nodes | oneway | - | abcd | no | - - When I match I should get - | trace | timestamps | matchings | - | abcd | 0 1 2 3 | abcd | - Scenario: Testbot - Map matching with small distortion Given the node map """ diff --git a/features/testbot/via.feature b/features/testbot/via.feature index 017cc54e6..44a2aaeeb 100644 --- a/features/testbot/via.feature +++ b/features/testbot/via.feature @@ -65,32 +65,6 @@ Feature: Via points | waypoints | route | turns | | 1,2,3 | cd,ac,ab,bd,cd | depart,new name right,new name right,new name right,arrive | - Scenario: Simple via point with core factor - Given the contract extra arguments "--core 0.8" - Given the node map - """ - a b c d - e f g - h i - j - """ - - And the ways - | nodes | - | abcd | - | efg | - | hi | - | be | - | cfh | - | dgij | - - When I route I should get - | waypoints | route | - | a,b,c | abcd,abcd,abcd,abcd | - | c,b,a | abcd,abcd,abcd,abcd | - | a,d,j | abcd,abcd,dgij,dgij | - | j,d,a | dgij,dgij,abcd,abcd | - Scenario: Via point at a dead end Given the node map """ diff --git a/scripts/ci/windows-build.bat b/scripts/ci/windows-build.bat index 2102c9340..e2c04c0eb 100644 --- a/scripts/ci/windows-build.bat +++ b/scripts/ci/windows-build.bat @@ -59,7 +59,6 @@ IF %ERRORLEVEL% NEQ 0 GOTO ERROR SET test_region=monaco SET test_region_ch=ch\monaco -SET test_region_corech=corech\monaco SET test_region_mld=mld\monaco SET test_osm=%test_region%.osm.pbf COPY %PROJECT_DIR%\test\data\%test_region%.osm.pbf %test_osm% @@ -69,18 +68,13 @@ IF %ERRORLEVEL% NEQ 0 GOTO ERROR MKDIR ch XCOPY %test_region%.osrm.* ch\ XCOPY %test_region%.osrm ch\ -MKDIR corech -XCOPY %test_region%.osrm.* corech\ -XCOPY %test_region%.osrm corech\ MKDIR mld XCOPY %test_region%.osrm.* mld\ XCOPY %test_region%.osrm mld\ %CONFIGURATION%\osrm-contract.exe %test_region_ch%.osrm -%CONFIGURATION%\osrm-contract.exe --core 0.8 %test_region_corech%.osrm %CONFIGURATION%\osrm-partition.exe %test_region_mld%.osrm %CONFIGURATION%\osrm-customize.exe %test_region_mld%.osrm XCOPY /Y ch\*.* ..\test\data\ch\ -XCOPY /Y corech\*.* ..\test\data\corech\ XCOPY /Y mld\*.* ..\test\data\mld\ unit_tests\%CONFIGURATION%\library-tests.exe IF %ERRORLEVEL% NEQ 0 GOTO ERROR diff --git a/src/tools/contract.cpp b/src/tools/contract.cpp index 6f7900e62..e0b0a830b 100644 --- a/src/tools/contract.cpp +++ b/src/tools/contract.cpp @@ -46,25 +46,16 @@ return_code parseArguments(int argc, boost::program_options::value(&contractor_config.requested_num_threads) ->default_value(std::thread::hardware_concurrency()), "Number of threads to use")( - "core,k", - boost::program_options::value(&contractor_config.core_factor)->default_value(1.0), - "DEPRECATED: Will always be 1.0. Percentage of the graph (in vertices) to contract " - "[0..1].")("segment-speed-file", - boost::program_options::value>( - &contractor_config.updater_config.segment_speed_lookup_paths) - ->composing(), - "Lookup files containing nodeA, nodeB, speed data to adjust edge weights")( + "segment-speed-file", + boost::program_options::value>( + &contractor_config.updater_config.segment_speed_lookup_paths) + ->composing(), + "Lookup files containing nodeA, nodeB, speed data to adjust edge weights")( "turn-penalty-file", boost::program_options::value>( &contractor_config.updater_config.turn_penalty_lookup_paths) ->composing(), "Lookup files containing from_, to_, via_nodes, and turn penalties to adjust turn weights")( - "level-cache,o", - boost::program_options::bool_switch(&contractor_config.use_cached_priority) - ->default_value(false), - "DEPRECATED: Will always be false. Use .level file to retain the contraction level for " - "each " - "node from the last run.")( "edge-weight-updates-over-factor", boost::program_options::value( &contractor_config.updater_config.log_edge_updates_factor)