aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/loader/1/basics/packages (renamed from tests/loader/external/1/basics/packages)0
-rw-r--r--tests/loader/1/basics/repositories (renamed from tests/loader/external/1/basics/repositories)0
-rw-r--r--tests/loader/1/math/packages (renamed from tests/loader/internal/1/math/packages)0
-rw-r--r--tests/loader/1/math/repositories (renamed from tests/loader/internal/1/math/repositories)2
-rw-r--r--tests/loader/1/misc/packages (renamed from tests/loader/external/1/misc/packages)0
-rw-r--r--tests/loader/1/misc/repositories (renamed from tests/loader/external/1/misc/repositories)0
-rw-r--r--tests/loader/1/stable/packages (renamed from tests/loader/internal/1/stable/packages)0
-rw-r--r--tests/loader/1/stable/repositories (renamed from tests/loader/internal/1/stable/repositories)2
-rw-r--r--tests/loader/1/staging/packages (renamed from tests/loader/external/1/staging/packages)0
-rw-r--r--tests/loader/1/staging/repositories (renamed from tests/loader/external/1/staging/repositories)0
-rw-r--r--tests/loader/1/testing/packages (renamed from tests/loader/external/1/testing/packages)0
-rw-r--r--tests/loader/1/testing/repositories (renamed from tests/loader/external/1/testing/repositories)0
-rw-r--r--tests/loader/driver.cxx48
-rw-r--r--tests/loader/r.conf4
14 files changed, 28 insertions, 28 deletions
diff --git a/tests/loader/external/1/basics/packages b/tests/loader/1/basics/packages
index 86c20c1..86c20c1 100644
--- a/tests/loader/external/1/basics/packages
+++ b/tests/loader/1/basics/packages
diff --git a/tests/loader/external/1/basics/repositories b/tests/loader/1/basics/repositories
index 57a1c7a..57a1c7a 100644
--- a/tests/loader/external/1/basics/repositories
+++ b/tests/loader/1/basics/repositories
diff --git a/tests/loader/internal/1/math/packages b/tests/loader/1/math/packages
index 4d34c13..4d34c13 100644
--- a/tests/loader/internal/1/math/packages
+++ b/tests/loader/1/math/packages
diff --git a/tests/loader/internal/1/math/repositories b/tests/loader/1/math/repositories
index c2df027..20aa30d 100644
--- a/tests/loader/internal/1/math/repositories
+++ b/tests/loader/1/math/repositories
@@ -1,7 +1,7 @@
: 1
# Foreign repository manifest.
#
-location: ../../../external/1/misc
+location: ../misc
:
# Local repository manifest (this repository).
#
diff --git a/tests/loader/external/1/misc/packages b/tests/loader/1/misc/packages
index e47208d..e47208d 100644
--- a/tests/loader/external/1/misc/packages
+++ b/tests/loader/1/misc/packages
diff --git a/tests/loader/external/1/misc/repositories b/tests/loader/1/misc/repositories
index 1a41290..1a41290 100644
--- a/tests/loader/external/1/misc/repositories
+++ b/tests/loader/1/misc/repositories
diff --git a/tests/loader/internal/1/stable/packages b/tests/loader/1/stable/packages
index 756a562..756a562 100644
--- a/tests/loader/internal/1/stable/packages
+++ b/tests/loader/1/stable/packages
diff --git a/tests/loader/internal/1/stable/repositories b/tests/loader/1/stable/repositories
index c06f731..b692ebe 100644
--- a/tests/loader/internal/1/stable/repositories
+++ b/tests/loader/1/stable/repositories
@@ -1,7 +1,7 @@
: 1
# Foreign repository manifest.
#
-location: ../../../external/1/misc
+location: ../misc
:
# Adjacent repository manifest.
#
diff --git a/tests/loader/external/1/staging/packages b/tests/loader/1/staging/packages
index e7b22b0..e7b22b0 100644
--- a/tests/loader/external/1/staging/packages
+++ b/tests/loader/1/staging/packages
diff --git a/tests/loader/external/1/staging/repositories b/tests/loader/1/staging/repositories
index 8443ab8..8443ab8 100644
--- a/tests/loader/external/1/staging/repositories
+++ b/tests/loader/1/staging/repositories
diff --git a/tests/loader/external/1/testing/packages b/tests/loader/1/testing/packages
index bdebece..bdebece 100644
--- a/tests/loader/external/1/testing/packages
+++ b/tests/loader/1/testing/packages
diff --git a/tests/loader/external/1/testing/repositories b/tests/loader/1/testing/repositories
index a218d5c..a218d5c 100644
--- a/tests/loader/external/1/testing/repositories
+++ b/tests/loader/1/testing/repositories
diff --git a/tests/loader/driver.cxx b/tests/loader/driver.cxx
index 0d361ab..94a0b86 100644
--- a/tests/loader/driver.cxx
+++ b/tests/loader/driver.cxx
@@ -2,10 +2,6 @@
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <vector>
-#include <memory> // shared_ptr
-#include <string>
-#include <cassert>
#include <iostream>
#include <exception>
#include <algorithm> // sort(), find()
@@ -16,9 +12,10 @@
#include <odb/pgsql/database.hxx>
#include <butl/process>
-#include <butl/timestamp> // timestamp_nonexistent
#include <butl/filesystem>
+#include <brep/types>
+#include <brep/utility>
#include <brep/package>
#include <brep/package-odb>
@@ -59,8 +56,6 @@ check_external (const package& p)
int
main (int argc, char* argv[])
{
- using brep::optional; // Ambiguity with butl::optional.
-
if (argc != 7)
{
cerr << "usage: " << argv[0]
@@ -83,7 +78,7 @@ main (int argc, char* argv[])
// Update packages file timestamp to enforce loader to update
// persistent state.
//
- path p (cp.directory () / path ("internal/1/stable/packages"));
+ path p (cp.directory () / path ("1/stable/packages"));
char const* args[] = {"touch", p.string ().c_str (), nullptr};
assert (process (args).wait ());
@@ -115,8 +110,9 @@ main (int argc, char* argv[])
//
assert (sr->location.canonical_name () == "cppget.org/stable");
assert (sr->location.string () ==
- "http://pkg.cppget.org/internal/1/stable");
+ "http://pkg.cppget.org/1/stable");
assert (sr->display_name == "stable");
+ assert (sr->priority == 1);
assert (!sr->url);
assert (sr->email && *sr->email == "repoman@cppget.org");
assert (sr->summary &&
@@ -125,7 +121,7 @@ main (int argc, char* argv[])
"This is the awesome C++ package repository full of exciting "
"stuff.");
- dir_path srp (cp.directory () / dir_path ("internal/1/stable"));
+ dir_path srp (cp.directory () / dir_path ("1/stable"));
assert (sr->local_path == srp.normalize ());
assert (sr->packages_timestamp == srt);
@@ -220,7 +216,7 @@ main (int argc, char* argv[])
assert (fpv2->dependencies[1][0] ==
dep (
"libexp",
- brep::optional<dependency_constraint> (
+ optional<dependency_constraint> (
dependency_constraint{comparison::eq, version ("1+1.2")})));
assert (fpv2->requirements.empty ());
@@ -250,7 +246,7 @@ main (int argc, char* argv[])
assert (fpv3->dependencies[0][0] ==
dep (
"libmisc",
- brep::optional<dependency_constraint> (
+ optional<dependency_constraint> (
dependency_constraint{comparison::ge, version ("2.0.0")})));
// libfoo-1.2.4
@@ -279,15 +275,16 @@ main (int argc, char* argv[])
assert (fpv4->dependencies[0][0] ==
dep (
"libmisc",
- brep::optional<dependency_constraint> (
+ optional<dependency_constraint> (
dependency_constraint{comparison::ge, version ("2.0.0")})));
// Verify 'math' repository.
//
assert (mr->location.canonical_name () == "cppget.org/math");
assert (mr->location.string () ==
- "http://pkg.cppget.org/internal/1/math");
+ "http://pkg.cppget.org/1/math");
assert (mr->display_name == "math");
+ assert (mr->priority == 2);
assert (!mr->url);
assert (mr->email && *mr->email == "repoman@cppget.org");
assert (mr->summary && *mr->summary == "Math C++ package repository");
@@ -295,7 +292,7 @@ main (int argc, char* argv[])
"This is the awesome C++ package repository full of remarkable "
"algorithms and\nAPIs.");
- dir_path mrp (cp.directory () / dir_path ("internal/1/math"));
+ dir_path mrp (cp.directory () / dir_path ("1/math"));
assert (mr->local_path == mrp.normalize ());
assert (mr->packages_timestamp ==
@@ -413,13 +410,13 @@ main (int argc, char* argv[])
assert (fpv5->dependencies[0][0] ==
dep (
"libmisc",
- brep::optional<dependency_constraint> (
+ optional<dependency_constraint> (
dependency_constraint{comparison::lt, version ("1.1")})));
assert (fpv5->dependencies[0][1] ==
dep (
"libmisc",
- brep::optional<dependency_constraint> (
+ optional<dependency_constraint> (
dependency_constraint{comparison::gt, version ("2.3.0")})));
assert (fpv5->dependencies[1].size () == 1);
@@ -427,7 +424,7 @@ main (int argc, char* argv[])
assert (fpv5->dependencies[1][0] ==
dep ("libexp",
- brep::optional<dependency_constraint> (
+ optional<dependency_constraint> (
dependency_constraint{comparison::ge, version ("1.0")})));
assert (fpv5->dependencies[2].size () == 2);
@@ -488,14 +485,15 @@ main (int argc, char* argv[])
//
assert (cr->location.canonical_name () == "cppget.org/misc");
assert (cr->location.string () ==
- "http://pkg.cppget.org/external/1/misc");
+ "http://pkg.cppget.org/1/misc");
assert (cr->display_name.empty ());
+ assert (cr->priority == 0);
assert (cr->url && *cr->url == "http://misc.cppget.org/");
assert (!cr->email);
assert (!cr->summary);
assert (!cr->description);
- dir_path crp (cp.directory () / dir_path ("external/1/misc"));
+ dir_path crp (cp.directory () / dir_path ("1/misc"));
assert (cr->local_path == crp.normalize ());
assert (cr->packages_timestamp ==
@@ -546,14 +544,15 @@ main (int argc, char* argv[])
//
assert (tr->location.canonical_name () == "cppget.org/testing");
assert (tr->location.string () ==
- "http://pkg.cppget.org/external/1/testing");
+ "http://pkg.cppget.org/1/testing");
assert (tr->display_name.empty ());
+ assert (tr->priority == 0);
assert (tr->url && *tr->url == "http://test.cppget.org/hello/");
assert (!tr->email);
assert (!tr->summary);
assert (!tr->description);
- dir_path trp (cp.directory () / dir_path ("external/1/testing"));
+ dir_path trp (cp.directory () / dir_path ("1/testing"));
assert (tr->local_path == trp.normalize ());
assert (tr->packages_timestamp ==
@@ -582,14 +581,15 @@ main (int argc, char* argv[])
//
assert (gr->location.canonical_name () == "cppget.org/staging");
assert (gr->location.string () ==
- "http://pkg.cppget.org/external/1/staging");
+ "http://pkg.cppget.org/1/staging");
assert (gr->display_name.empty ());
+ assert (gr->priority == 0);
assert (gr->url && *gr->url == "http://stage.cppget.org/");
assert (!gr->email);
assert (!gr->summary);
assert (!gr->description);
- dir_path grp (cp.directory () / dir_path ("external/1/staging"));
+ dir_path grp (cp.directory () / dir_path ("1/staging"));
assert (gr->local_path == grp.normalize ());
assert (gr->packages_timestamp ==
diff --git a/tests/loader/r.conf b/tests/loader/r.conf
index fea477a..8da4b77 100644
--- a/tests/loader/r.conf
+++ b/tests/loader/r.conf
@@ -1,2 +1,2 @@
-http://pkg.cppget.org/internal/1/stable stable internal/1/stable
-http://pkg.cppget.org/internal/1/math math internal/1/math
+http://pkg.cppget.org/1/stable stable 1/stable
+http://pkg.cppget.org/1/math math 1/math