aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bpkg/bpkg.cli5
-rw-r--r--bpkg/bpkg.cxx2
-rw-r--r--bpkg/buildfile2
-rw-r--r--bpkg/pkg-test21
-rw-r--r--bpkg/pkg-test.cli36
-rwxr-xr-xdoc/cli.sh2
6 files changed, 67 insertions, 1 deletions
diff --git a/bpkg/bpkg.cli b/bpkg/bpkg.cli
index cf0125e..295c627 100644
--- a/bpkg/bpkg.cli
+++ b/bpkg/bpkg.cli
@@ -100,6 +100,11 @@ namespace bpkg
"\l{bpkg-pkg-update(1)} \- update package"
}
+ bool pkg-test|test
+ {
+ "\l{bpkg-pkg-test(1)} \- test package"
+ }
+
bool pkg-clean|clean
{
"\l{bpkg-pkg-clean(1)} \- clean package"
diff --git a/bpkg/bpkg.cxx b/bpkg/bpkg.cxx
index dc318ed..35fb796 100644
--- a/bpkg/bpkg.cxx
+++ b/bpkg/bpkg.cxx
@@ -25,6 +25,7 @@
#include <bpkg/pkg-install>
#include <bpkg/pkg-purge>
#include <bpkg/pkg-status>
+#include <bpkg/pkg-test>
#include <bpkg/pkg-uninstall>
#include <bpkg/pkg-unpack>
#include <bpkg/pkg-update>
@@ -186,6 +187,7 @@ try
PKG_COMMAND (install);
PKG_COMMAND (purge);
PKG_COMMAND (status);
+ PKG_COMMAND (test);
PKG_COMMAND (uninstall);
PKG_COMMAND (unpack);
PKG_COMMAND (update);
diff --git a/bpkg/buildfile b/bpkg/buildfile
index 52d4520..e4f5756 100644
--- a/bpkg/buildfile
+++ b/bpkg/buildfile
@@ -33,6 +33,7 @@ exe{bpkg}: \
{hxx }{ pkg-install } {hxx ixx cxx}{ pkg-install-options } \
{hxx cxx}{ pkg-purge } {hxx ixx cxx}{ pkg-purge-options } \
{hxx cxx}{ pkg-status } {hxx ixx cxx}{ pkg-status-options } \
+{hxx }{ pkg-test } {hxx ixx cxx}{ pkg-test-options } \
{hxx }{ pkg-uninstall } {hxx ixx cxx}{ pkg-uninstall-options } \
{hxx cxx}{ pkg-unpack } {hxx ixx cxx}{ pkg-unpack-options } \
{hxx }{ pkg-update } {hxx ixx cxx}{ pkg-update-options } \
@@ -79,6 +80,7 @@ if! $cli.loaded
{hxx ixx cxx}{pkg-fetch-options}: cli{pkg-fetch}
{hxx ixx cxx}{pkg-install-options}: cli{pkg-install}
{hxx ixx cxx}{pkg-purge-options}: cli{pkg-purge}
+{hxx ixx cxx}{pkg-test-options}: cli{pkg-test}
{hxx ixx cxx}{pkg-status-options}: cli{pkg-status}
{hxx ixx cxx}{pkg-uninstall-options}: cli{pkg-uninstall}
{hxx ixx cxx}{pkg-unpack-options}: cli{pkg-unpack}
diff --git a/bpkg/pkg-test b/bpkg/pkg-test
new file mode 100644
index 0000000..cb42b14
--- /dev/null
+++ b/bpkg/pkg-test
@@ -0,0 +1,21 @@
+// file : bpkg/pkg-test -*- C++ -*-
+// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd
+// license : MIT; see accompanying LICENSE file
+
+#ifndef BPKG_PKG_TEST
+#define BPKG_PKG_TEST
+
+#include <bpkg/types>
+#include <bpkg/pkg-command>
+#include <bpkg/pkg-test-options>
+
+namespace bpkg
+{
+ inline int
+ pkg_test (const pkg_test_options& o, cli::scanner& args)
+ {
+ return pkg_command ("test", o, args);
+ }
+}
+
+#endif // BPKG_PKG_TEST
diff --git a/bpkg/pkg-test.cli b/bpkg/pkg-test.cli
new file mode 100644
index 0000000..e04ba5f
--- /dev/null
+++ b/bpkg/pkg-test.cli
@@ -0,0 +1,36 @@
+// file : bpkg/pkg-test.cli
+// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd
+// license : MIT; see accompanying LICENSE file
+
+include <bpkg/configuration.cli>;
+
+"\section=1"
+"\name=bpkg-pkg-test"
+"\summary=test package"
+
+namespace bpkg
+{
+ {
+ "<options> <vars> <pkg>",
+
+ "\h|SYNOPSIS|
+
+ \c{\b{bpkg pkg-test}|\b{test} [<options>] [<vars>] (<pkg> [<vars>])...}
+
+ \h|DESCRIPTION|
+
+ The \cb{pkg-test} command tests the previously configured (via
+ \l{bpkg-pkg-build(1)} or \l{bpkg-pkg-configure(1)}) package. Underneath,
+ this command doesn't do much more than run \cb{b test}.
+
+ Additional command line variables (<vars>, normally \cb{config.*}) can be
+ passed to the build system by either specifying them before the packages,
+ in which case they apply to all of them, or after a specific package, in
+ which case they apply only to this package."
+ }
+
+ class pkg_test_options: configuration_options
+ {
+ "\h|PKG-TEST OPTIONS|"
+ };
+}
diff --git a/doc/cli.sh b/doc/cli.sh
index d022a47..8422e7c 100755
--- a/doc/cli.sh
+++ b/doc/cli.sh
@@ -51,7 +51,7 @@ compile "bpkg" $o --output-prefix "" --suppress-undocumented --class-doc bpkg::c
pages="cfg-add cfg-create cfg-fetch help pkg-build pkg-clean pkg-configure \
pkg-disfigure pkg-drop pkg-fetch pkg-install pkg-purge pkg-status \
-pkg-uninstall pkg-unpack pkg-update pkg-verify rep-create rep-info"
+pkg-test pkg-uninstall pkg-unpack pkg-update pkg-verify rep-create rep-info"
for p in $pages; do
compile $p $o