aboutsummaryrefslogtreecommitdiff
path: root/tests/pkg-build.test
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-03-08 20:07:40 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-03-09 14:54:52 +0300
commita8218ef3b2f2706a810d10f3956982e5b0bd6c57 (patch)
treec6609b8bbab124047b826b36fb5e406152287a85 /tests/pkg-build.test
parenta9dcee01b4d4d39d18db60092533dc2985d1c2d4 (diff)
Search for repository location in database before parsing for pkg-build
Diffstat (limited to 'tests/pkg-build.test')
-rw-r--r--tests/pkg-build.test50
1 files changed, 38 insertions, 12 deletions
diff --git a/tests/pkg-build.test b/tests/pkg-build.test
index f5b3dee..6c5ceed 100644
--- a/tests/pkg-build.test
+++ b/tests/pkg-build.test
@@ -1445,6 +1445,29 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
error: package libbar is not found in pkg:build2.org/pkg-build/t4d or its complements
EOE
}
+
+ : location-search
+ :
+ : Test that the repository location is searched in the database before being
+ : parsed. The latest would fail as the repository type would be misguessed.
+ :
+ {
+ $clone_root_cfg;
+ $rep_add $src/libfoo-1.1.0 --type dir && $rep_fetch;
+
+ d = $canonicalize([dir_path] $src/libfoo-1.1.0);
+
+ $* "libfoo@$d" 2>>~"%EOE%";
+ fetching dir:$d
+ using libfoo/1.1.0 \(external\)
+ configured libfoo/1.1.0
+ %info: .+dir\\{libfoo-1.1.0.\\} is up to date%
+ updated libfoo/1.1.0
+ EOE
+
+ $pkg_disfigure libfoo 2>'disfigured libfoo/1.1.0';
+ $pkg_purge libfoo 2>'purged libfoo/1.1.0'
+ }
}
: dir-rep
@@ -1455,19 +1478,22 @@ rep_fetch += -d cfg --auth all --trust-yes 2>!
: Test that dir (local) repository is preferred over non-dir local repository
: that comes first.
:
- $clone_root_cfg;
- $rep_fetch $rep/t4a;
- $rep_add $src/libfoo-1.1.0 --type dir && $rep_fetch "dir:$src/libfoo-1.1.0";
-
- $* libfoo 2>>~%EOE%;
- using libfoo/1.1.0 (external)
- configured libfoo/1.1.0
- %info: .+dir\{libfoo-1.1.0.\} is up to date%
- updated libfoo/1.1.0
- EOE
+ {
+ $clone_root_cfg;
+ $rep_fetch $rep/t4a;
+ $rep_add $src/libfoo-1.1.0 --type dir;
+ $rep_fetch "dir:$canonicalize([dir_path] $src/libfoo-1.1.0)";
+
+ $* libfoo 2>>~%EOE%;
+ using libfoo/1.1.0 (external)
+ configured libfoo/1.1.0
+ %info: .+dir\{libfoo-1.1.0.\} is up to date%
+ updated libfoo/1.1.0
+ EOE
- $pkg_disfigure libfoo 2>'disfigured libfoo/1.1.0';
- $pkg_purge libfoo 2>'purged libfoo/1.1.0'
+ $pkg_disfigure libfoo 2>'disfigured libfoo/1.1.0';
+ $pkg_purge libfoo 2>'purged libfoo/1.1.0'
+ }
}
: git-rep