aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bdep/.gitignore5
-rw-r--r--bdep/buildfile36
2 files changed, 36 insertions, 5 deletions
diff --git a/bdep/.gitignore b/bdep/.gitignore
index da387e5..97e4d6d 100644
--- a/bdep/.gitignore
+++ b/bdep/.gitignore
@@ -1,5 +1,10 @@
bdep
+*.test
*-odb.?xx
*-options.?xx
projects-configs.?xx
version.hxx
+
+# Testscript output directory (can be symlink).
+#
+test-*.test
diff --git a/bdep/buildfile b/bdep/buildfile
index 9734c22..b6338d7 100644
--- a/bdep/buildfile
+++ b/bdep/buildfile
@@ -38,14 +38,40 @@ clean-options
help_topics = projects-configs
-exe{bdep}: \
- {hxx ixx txx cxx}{** -{$options_topics} -{$help_topics} -*-odb -version} \
- {hxx ixx cxx}{$options_topics} {hxx cxx}{$help_topics} \
- {hxx ixx cxx}{project-odb database-views-odb} \
- {hxx}{version} $libs
+./: exe{bdep}: cxx{bdep} libue{bdep}
+
+libue{bdep}: {hxx ixx txx cxx}{** -bdep \
+ -{$options_topics} \
+ -{$help_topics} \
+ -*-odb \
+ -version \
+ -**.test...} \
+ {hxx ixx cxx}{$options_topics} \
+ {hxx cxx}{$help_topics} \
+ {hxx ixx cxx}{project-odb database-views-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{bdep}: bin.whole = false
+}
+
# Build options.
#
obj{utility}: cxx.poptions += -DBDEP_EXE_SUFFIX='"'$bin.exe.suffix'"'