aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-03-12 19:21:01 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-03-12 19:37:35 +0300
commitee16762d8435ec1a6dfe4a82655cde5624bb2c38 (patch)
tree338c5488966c1e7d35f5afa20e78f153443b1b32 /tests
parent17ea04afcce1af129cac9dd2f840799a6e8b50eb (diff)
Add support for shallow fetch
Diffstat (limited to 'tests')
-rw-r--r--tests/rep-fetch.test64
1 files changed, 52 insertions, 12 deletions
diff --git a/tests/rep-fetch.test b/tests/rep-fetch.test
index f0c0e2d..2339b91 100644
--- a/tests/rep-fetch.test
+++ b/tests/rep-fetch.test
@@ -142,19 +142,19 @@ $* 2>>/EOE != 0
$* --trust-yes 2>>EOE;
fetching pkg:build2.org/rep-fetch/bar/unstable
- fetching pkg:build2.org/rep-fetch/foo/testing (prerequisite of pkg:build2.org/rep-fetch/bar/unstable)
- fetching pkg:build2.org/rep-fetch/foo/stable (complements pkg:build2.org/rep-fetch/foo/testing)
fetching pkg:build2.org/rep-fetch/bar/testing (complements pkg:build2.org/rep-fetch/bar/unstable)
fetching pkg:build2.org/rep-fetch/bar/stable (complements pkg:build2.org/rep-fetch/bar/testing)
+ fetching pkg:build2.org/rep-fetch/foo/stable (prerequisite of pkg:build2.org/rep-fetch/bar/stable)
+ fetching pkg:build2.org/rep-fetch/foo/testing (prerequisite of pkg:build2.org/rep-fetch/bar/testing)
5 package(s) in 5 repository(s)
EOE
$* 2>>EOE
fetching pkg:build2.org/rep-fetch/bar/unstable
- fetching pkg:build2.org/rep-fetch/foo/testing (prerequisite of pkg:build2.org/rep-fetch/bar/unstable)
- fetching pkg:build2.org/rep-fetch/foo/stable (complements pkg:build2.org/rep-fetch/foo/testing)
fetching pkg:build2.org/rep-fetch/bar/testing (complements pkg:build2.org/rep-fetch/bar/unstable)
fetching pkg:build2.org/rep-fetch/bar/stable (complements pkg:build2.org/rep-fetch/bar/testing)
+ fetching pkg:build2.org/rep-fetch/foo/stable (prerequisite of pkg:build2.org/rep-fetch/bar/stable)
+ fetching pkg:build2.org/rep-fetch/foo/testing (prerequisite of pkg:build2.org/rep-fetch/bar/testing)
5 package(s) in 5 repository(s)
EOE
}
@@ -166,20 +166,20 @@ $* 2>>/EOE != 0
$* --trust-yes 2>>EOE &cfg/.bpkg/certs/**;
fetching pkg:build2.org/rep-fetch/bar/unstable
- fetching pkg:build2.org/rep-fetch/foo/testing (prerequisite of pkg:build2.org/rep-fetch/bar/unstable)
- fetching pkg:build2.org/rep-fetch/foo/stable (complements pkg:build2.org/rep-fetch/foo/testing)
fetching pkg:build2.org/rep-fetch/bar/testing (complements pkg:build2.org/rep-fetch/bar/unstable)
fetching pkg:build2.org/rep-fetch/bar/stable (complements pkg:build2.org/rep-fetch/bar/testing)
+ fetching pkg:build2.org/rep-fetch/foo/stable (prerequisite of pkg:build2.org/rep-fetch/bar/stable)
+ fetching pkg:build2.org/rep-fetch/foo/testing (prerequisite of pkg:build2.org/rep-fetch/bar/testing)
fetching pkg:build2.org/rep-fetch/hello
6 package(s) in 6 repository(s)
EOE
$* 2>>EOE
fetching pkg:build2.org/rep-fetch/bar/unstable
- fetching pkg:build2.org/rep-fetch/foo/testing (prerequisite of pkg:build2.org/rep-fetch/bar/unstable)
- fetching pkg:build2.org/rep-fetch/foo/stable (complements pkg:build2.org/rep-fetch/foo/testing)
fetching pkg:build2.org/rep-fetch/bar/testing (complements pkg:build2.org/rep-fetch/bar/unstable)
fetching pkg:build2.org/rep-fetch/bar/stable (complements pkg:build2.org/rep-fetch/bar/testing)
+ fetching pkg:build2.org/rep-fetch/foo/stable (prerequisite of pkg:build2.org/rep-fetch/bar/stable)
+ fetching pkg:build2.org/rep-fetch/foo/testing (prerequisite of pkg:build2.org/rep-fetch/bar/testing)
fetching pkg:build2.org/rep-fetch/hello
6 package(s) in 6 repository(s)
EOE
@@ -193,19 +193,19 @@ $* 2>>/EOE != 0
$* --trust-yes $rep/bar/unstable 2>>EOE;
added pkg:build2.org/rep-fetch/bar/unstable
fetching pkg:build2.org/rep-fetch/bar/unstable
- fetching pkg:build2.org/rep-fetch/foo/testing (prerequisite of pkg:build2.org/rep-fetch/bar/unstable)
- fetching pkg:build2.org/rep-fetch/foo/stable (complements pkg:build2.org/rep-fetch/foo/testing)
fetching pkg:build2.org/rep-fetch/bar/testing (complements pkg:build2.org/rep-fetch/bar/unstable)
fetching pkg:build2.org/rep-fetch/bar/stable (complements pkg:build2.org/rep-fetch/bar/testing)
+ fetching pkg:build2.org/rep-fetch/foo/stable (prerequisite of pkg:build2.org/rep-fetch/bar/stable)
+ fetching pkg:build2.org/rep-fetch/foo/testing (prerequisite of pkg:build2.org/rep-fetch/bar/testing)
5 package(s) in 5 repository(s)
EOE
$* 'pkg:build2.org/rep-fetch/bar/unstable' 2>>EOE;
fetching pkg:build2.org/rep-fetch/bar/unstable
- fetching pkg:build2.org/rep-fetch/foo/testing (prerequisite of pkg:build2.org/rep-fetch/bar/unstable)
- fetching pkg:build2.org/rep-fetch/foo/stable (complements pkg:build2.org/rep-fetch/foo/testing)
fetching pkg:build2.org/rep-fetch/bar/testing (complements pkg:build2.org/rep-fetch/bar/unstable)
fetching pkg:build2.org/rep-fetch/bar/stable (complements pkg:build2.org/rep-fetch/bar/testing)
+ fetching pkg:build2.org/rep-fetch/foo/stable (prerequisite of pkg:build2.org/rep-fetch/bar/stable)
+ fetching pkg:build2.org/rep-fetch/foo/testing (prerequisite of pkg:build2.org/rep-fetch/bar/testing)
5 package(s) in 5 repository(s)
EOE
@@ -369,6 +369,46 @@ if ($remote != true)
prerequisite dir:($rep/style-basic.git) ($rep/style-basic.git)
EOO
}
+
+ : shallow
+ :
+ {
+ +$clone_cfg
+
+ : respected
+ :
+ {
+ $clone_cfg;
+ $* 2>!;
+
+ $* --shallow "dir:($rep/libbar.git)" 2>>"EOE";
+ fetching dir:($rep/libbar.git)
+ 3 package\(s\) in 2 repository\(s\)
+ EOE
+
+ $rep_list >>"EOO"
+ dir:($rep/libbar.git) ($rep/libbar.git)
+ prerequisite dir:($rep/style-basic.git) ($rep/style-basic.git)
+ EOO
+ }
+
+ : ignored
+ :
+ {
+ $clone_cfg;
+
+ $* --shallow 2>>"EOE";
+ fetching dir:($rep/libbar.git)
+ fetching dir:($rep/style-basic.git) \(prerequisite of dir:($rep/libbar.git)\)
+ 3 package\(s\) in 2 repository\(s\)
+ EOE
+
+ $rep_list >>"EOO"
+ dir:($rep/libbar.git) ($rep/libbar.git)
+ prerequisite dir:($rep/style-basic.git) ($rep/style-basic.git)
+ EOO
+ }
+ }
}
: git-rep