aboutsummaryrefslogtreecommitdiff
path: root/bpkg/buildfile
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-03-06 17:48:39 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-03-08 16:50:07 +0300
commit82f7caf802270629a983b6d769805d1e6bdf55ae (patch)
tree4440ff62f6fa2ff0a8060c5647c1ce55dcb95216 /bpkg/buildfile
parenta6107af416eb1c62e55d847368ed07697229a1f6 (diff)
Use new setup for unit tests
Diffstat (limited to 'bpkg/buildfile')
-rw-r--r--bpkg/buildfile36
1 files changed, 31 insertions, 5 deletions
diff --git a/bpkg/buildfile b/bpkg/buildfile
index fb98007..fb12eef 100644
--- a/bpkg/buildfile
+++ b/bpkg/buildfile
@@ -44,14 +44,40 @@ rep-remove-options
help_topics = repository-signing repository-types argument-grouping
-exe{bpkg}: \
- {hxx ixx txx cxx}{** -{$options_topics} -{$help_topics} -*-odb -version} \
- {hxx ixx cxx}{$options_topics} {hxx cxx}{$help_topics} \
- {hxx ixx cxx}{package-odb} {hxx}{version} \
- $libs xml{*}
+./: exe{bpkg}: cxx{bpkg} libue{bpkg}
+
+libue{bpkg}: {hxx ixx txx cxx}{** -bpkg \
+ -{$options_topics} \
+ -{$help_topics} \
+ -*-odb \
+ -version \
+ -**.test...} \
+ {hxx ixx cxx}{$options_topics} \
+ {hxx cxx}{$help_topics} \
+ {hxx ixx cxx}{package-odb} \
+ {hxx}{version} \
+ $libs \
+ xml{*}
hxx{version}: in{version} $src_root/manifest
+# Unit tests.
+#
+exe{*.test}:
+{
+ test = true
+ install = false
+}
+
+for t: cxx{**.test...}
+{
+ d = $directory($t)
+ n = $name($t)...
+
+ ./: $d/exe{$n}: $t $d/{hxx ixx txx}{+$n} $d/testscript{+$n}
+ $d/exe{$n}: libue{bpkg}: bin.whole = false
+}
+
# Build options.
#
# Disable "unknown pragma" warnings.