diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/manifest/.gitignore | 2 | ||||
-rw-r--r-- | tests/manifest/buildfile | 20 | ||||
-rw-r--r-- | tests/manifest/driver.cxx | 9 | ||||
-rw-r--r-- | tests/manifest/packages (renamed from tests/manifest/manifest) | 3 | ||||
-rw-r--r-- | tests/manifest/repositories | 5 |
5 files changed, 32 insertions, 7 deletions
diff --git a/tests/manifest/.gitignore b/tests/manifest/.gitignore new file mode 100644 index 0000000..d0bb148 --- /dev/null +++ b/tests/manifest/.gitignore @@ -0,0 +1,2 @@ +pdriver +rdriver diff --git a/tests/manifest/buildfile b/tests/manifest/buildfile index 9dc2258..76041c6 100644 --- a/tests/manifest/buildfile +++ b/tests/manifest/buildfile @@ -2,7 +2,23 @@ # copyright : Copyright (c) 2014-2015 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} ../../bpkg/lib{bpkg} -exe{driver}: test.roundtrip = manifest +#exe{driver}: cxx{driver} ../../bpkg/lib{bpkg} +#exe{driver}: test.roundtrip = manifest + +# @@ Hack until build2 supports multiple tests. Also remove .gitignore. +# +./: exe{pdriver} exe{rdriver} + +exe{pdriver}: obj{pdriver} +exe{pdriver}: test.roundtrip = packages + +exe{rdriver}: obj{rdriver} +exe{rdriver}: test.roundtrip = repositories + +obj{pdriver rdriver}: cxx{driver} +exe{pdriver rdriver} obj{pdriver rdriver}: ../../bpkg/lib{bpkg} + +obj{pdriver}: cxx.poptions += -DTEST_PACKAGES +obj{rdriver}: cxx.poptions += -DTEST_REPOSITORIES include ../../bpkg/ diff --git a/tests/manifest/driver.cxx b/tests/manifest/driver.cxx index f3b5abf..4722425 100644 --- a/tests/manifest/driver.cxx +++ b/tests/manifest/driver.cxx @@ -25,10 +25,15 @@ main (int argc, char* argv[]) { ifstream ifs; ifs.exceptions (ifstream::badbit | ifstream::failbit); - ifs.open (argv[1], ifstream::in | ifstream::binary); + ifs.open (argv[1]); manifest_parser p (ifs, argv[1]); - manifests ms (p); + +#ifdef TEST_PACKAGES + package_manifests ms (p); +#else + repository_manifests ms (p); +#endif manifest_serializer s (cout, "stdout"); ms.serialize (s); diff --git a/tests/manifest/manifest b/tests/manifest/packages index 902a7ac..9ae65bc 100644 --- a/tests/manifest/manifest +++ b/tests/manifest/packages @@ -1,7 +1,4 @@ : 1 -location: http://pkg.example.org/1/math -: -: name: libfoo version: 1.2.3-2 priority: high; Due to critical bug fix. diff --git a/tests/manifest/repositories b/tests/manifest/repositories new file mode 100644 index 0000000..b446dd4 --- /dev/null +++ b/tests/manifest/repositories @@ -0,0 +1,5 @@ +: 1 +location: http://pkg.example.org/1/math +: +location: ../stable +: |