diff options
-rw-r--r-- | bpkg/.gitignore | 5 | ||||
-rw-r--r-- | bpkg/buildfile | 36 |
2 files changed, 36 insertions, 5 deletions
diff --git a/bpkg/.gitignore b/bpkg/.gitignore index ebdc8f6..e2eadc4 100644 --- a/bpkg/.gitignore +++ b/bpkg/.gitignore @@ -1,7 +1,12 @@ bpkg +*.test *-options.?xx *-odb.?xx repository-signing.?xx repository-types.?xx argument-grouping.?xx version.hxx + +# Testscript output directory (can be symlink). +# +test-*.test 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. |