aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-03-06 19:40:37 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-03-08 16:55:32 +0300
commitd80bee7ed065170c90ffa0fad04e88c2b31c37da (patch)
tree0c15807130ab2672cb9781a474336805997885eb
parent0a0b0cce022bdc7b908144c9e9a33a96e78dbcdf (diff)
Use new setup for unit tests
-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'"'