From 9be433ac34057a2c9c1757ec41f8b3f6361f98dc Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 4 Jul 2018 22:10:38 +0300 Subject: Strip .git extension for non-existent local prerequisite location If the local prerequisite git repository having the .git extension doesn't exist but the one without the extension does, then strip the extension from the location. --- tests/rep-fetch.test | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'tests') diff --git a/tests/rep-fetch.test b/tests/rep-fetch.test index bd91ebf..9543045 100644 --- a/tests/rep-fetch.test +++ b/tests/rep-fetch.test @@ -721,6 +721,39 @@ else } } + : strip-ext + : + : Test that if the local prerequisite git repository having the .git + : extension does not exist but the one without the extension does, then + : it is picked up by rep-fetch. + : + if ($remote != true) + { + cp -r $out_git/state0/libbar.git libbar.git; + cp -r $out_git/state0/style-basic.git style-basic; + + $clone_root_cfg; + + rep = ($cxx.target.class != 'windows' \ + ? "file:$~" \ + : "file:/$regex.replace($~, '\\', '/')"); + + $* "$rep/libbar.git#master" 2>>~%EOE% &cfg/.bpkg/repos/*/***; + %added git:.+libbar#master% + %querying .+libbar\.git% + %fetching from .+libbar\.git% + %fetching git:.+style-basic#stable \(prerequisite of git:.+libbar#master\)% + %querying .+style-basic% + %fetching from .+style-basic% + 3 package(s) in 2 repository(s) + EOE + + $rep_list >>~%EOO% + %git:.+libbar#master file:.+libbar\.git#master% + % prerequisite git:.+style-basic#stable file:.+style-basic#stable \(heads/master\)% + EOO + } + : checkout-submodules : : Test that if some of the packages are located in the repository -- cgit v1.1