aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-03-06 23:06:30 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-03-08 16:42:31 +0300
commit77410b0cdde47219d6c6a36533fcb9354f17c3dd (patch)
tree703c39f3bc81792fabaf81769035f01a08cf6a2f
parent8ca10194e206a181797ffb7a73dd2deee12ac753 (diff)
Use new setup for unit tests
-rw-r--r--build/root.build6
-rw-r--r--build2/.gitignore5
-rw-r--r--build2/buildfile24
-rw-r--r--build2/cc/lexer+char-literal.test.testscript (renamed from unit-tests/cc/lexer/char-literal.testscript)2
-rw-r--r--build2/cc/lexer+comment.test.testscript (renamed from unit-tests/cc/lexer/comment.testscript)2
-rw-r--r--build2/cc/lexer+line.test.testscript (renamed from unit-tests/cc/lexer/line.testscript)2
-rw-r--r--build2/cc/lexer+number.test.testscript (renamed from unit-tests/cc/lexer/number.testscript)2
-rw-r--r--build2/cc/lexer+preprocessor.test.testscript (renamed from unit-tests/cc/lexer/preprocessor.testscript)2
-rw-r--r--build2/cc/lexer+raw-string-literal.test.testscript (renamed from unit-tests/cc/lexer/raw-string-literal.testscript)2
-rw-r--r--build2/cc/lexer+string-literal.test.testscript (renamed from unit-tests/cc/lexer/string-literal.testscript)2
-rw-r--r--build2/cc/lexer.test.cxx (renamed from unit-tests/cc/lexer/driver.cxx)2
-rw-r--r--build2/cc/parser+module.test.testscript (renamed from unit-tests/cc/parser/module.testscript)2
-rw-r--r--build2/cc/parser.test.cxx (renamed from unit-tests/cc/parser/driver.cxx)2
-rw-r--r--build2/function+call.test.testscript (renamed from unit-tests/function/call.testscript)2
-rw-r--r--build2/function+syntax.test.testscript (renamed from unit-tests/function/syntax.testscript)2
-rw-r--r--build2/function.test.cxx (renamed from unit-tests/function/driver.cxx)2
-rw-r--r--build2/lexer+buildspec.test.testscript (renamed from unit-tests/lexer/buildspec.testscript)2
-rw-r--r--build2/lexer+comment.test.testscript (renamed from unit-tests/lexer/comment.testscript)2
-rw-r--r--build2/lexer+eval.test.testscript (renamed from unit-tests/lexer/eval.testscript)2
-rw-r--r--build2/lexer+quoting.test.testscript (renamed from unit-tests/lexer/quoting.testscript)2
-rw-r--r--build2/lexer.test.cxx (renamed from unit-tests/lexer/driver.cxx)2
-rw-r--r--build2/name.test.cxx (renamed from unit-tests/name/driver.cxx)2
-rw-r--r--build2/scheduler.test.cxx (renamed from unit-tests/scheduler/driver.cxx)2
-rw-r--r--build2/test/script/lexer+command-expansion.test.testscript (renamed from unit-tests/test/script/lexer/command-expansion.testscript)2
-rw-r--r--build2/test/script/lexer+command-line.test.testscript (renamed from unit-tests/test/script/lexer/command-line.testscript)2
-rw-r--r--build2/test/script/lexer+description-line.test.testscript (renamed from unit-tests/test/script/lexer/description-line.testscript)2
-rw-r--r--build2/test/script/lexer+first-token.test.testscript (renamed from unit-tests/test/script/lexer/first-token.testscript)2
-rw-r--r--build2/test/script/lexer+second-token.test.testscript (renamed from unit-tests/test/script/lexer/second-token.testscript)2
-rw-r--r--build2/test/script/lexer+variable-line.test.testscript (renamed from unit-tests/test/script/lexer/variable-line.testscript)2
-rw-r--r--build2/test/script/lexer+variable.test.testscript (renamed from unit-tests/test/script/lexer/variable.testscript)2
-rw-r--r--build2/test/script/lexer.test.cxx (renamed from unit-tests/test/script/lexer/driver.cxx)2
-rw-r--r--build2/test/script/parser+cleanup.test.testscript (renamed from unit-tests/test/script/parser/cleanup.testscript)2
-rw-r--r--build2/test/script/parser+command-if.test.testscript (renamed from unit-tests/test/script/parser/command-if.testscript)2
-rw-r--r--build2/test/script/parser+command-re-parse.test.testscript (renamed from unit-tests/test/script/parser/command-re-parse.testscript)2
-rw-r--r--build2/test/script/parser+description.test.testscript (renamed from unit-tests/test/script/parser/description.testscript)2
-rw-r--r--build2/test/script/parser+directive.test.testscript (renamed from unit-tests/test/script/parser/directive.testscript)2
-rw-r--r--build2/test/script/parser+exit.test.testscript (renamed from unit-tests/test/script/parser/exit.testscript)2
-rw-r--r--build2/test/script/parser+expansion.test.testscript (renamed from unit-tests/test/script/parser/expansion.testscript)2
-rw-r--r--build2/test/script/parser+here-document.test.testscript (renamed from unit-tests/test/script/parser/here-document.testscript)2
-rw-r--r--build2/test/script/parser+here-string.test.testscript (renamed from unit-tests/test/script/parser/here-string.testscript)2
-rw-r--r--build2/test/script/parser+include.test.testscript (renamed from unit-tests/test/script/parser/include.testscript)2
-rw-r--r--build2/test/script/parser+pipe-expr.test.testscript (renamed from unit-tests/test/script/parser/pipe-expr.testscript)2
-rw-r--r--build2/test/script/parser+pre-parse.test.testscript (renamed from unit-tests/test/script/parser/pre-parse.testscript)2
-rw-r--r--build2/test/script/parser+redirect.test.testscript (renamed from unit-tests/test/script/parser/redirect.testscript)2
-rw-r--r--build2/test/script/parser+regex.test.testscript (renamed from unit-tests/test/script/parser/regex.testscript)2
-rw-r--r--build2/test/script/parser+scope-if.test.testscript (renamed from unit-tests/test/script/parser/scope-if.testscript)2
-rw-r--r--build2/test/script/parser+scope.test.testscript (renamed from unit-tests/test/script/parser/scope.testscript)2
-rw-r--r--build2/test/script/parser+setup-teardown.test.testscript (renamed from unit-tests/test/script/parser/setup-teardown.testscript)2
-rw-r--r--build2/test/script/parser.test.cxx (renamed from unit-tests/test/script/parser/driver.cxx)2
-rw-r--r--build2/test/script/regex.test.cxx (renamed from unit-tests/test/script/regex/driver.cxx)2
-rw-r--r--buildfile1
-rw-r--r--unit-tests/.gitignore6
-rw-r--r--unit-tests/cc/lexer/buildfile6
-rw-r--r--unit-tests/cc/parser/buildfile6
-rw-r--r--unit-tests/function/buildfile6
-rw-r--r--unit-tests/lexer/buildfile6
-rw-r--r--unit-tests/name/buildfile6
-rw-r--r--unit-tests/scheduler/buildfile6
-rw-r--r--unit-tests/test/script/lexer/buildfile6
-rw-r--r--unit-tests/test/script/parser/buildfile6
-rw-r--r--unit-tests/test/script/regex/buildfile6
61 files changed, 73 insertions, 117 deletions
diff --git a/build/root.build b/build/root.build
index 6640407..03e3fe6 100644
--- a/build/root.build
+++ b/build/root.build
@@ -34,12 +34,6 @@ using c
#
using? cli
-# All exe{} in unit-tests/ are, well, tests. Also don't link whole archives
-# by default there.
-#
-unit-tests/exe{*}: test = true
-unit-tests/libu{*}: bin.whole = false
-
# Specify the test target for cross-testing.
#
test.target = $cxx.target
diff --git a/build2/.gitignore b/build2/.gitignore
index 5ea3913..51b4c16 100644
--- a/build2/.gitignore
+++ b/build2/.gitignore
@@ -1,6 +1,11 @@
b
b-boot
+*.test
#*-options
#*-options.?xx
config.hxx
version.hxx
+
+# Testscript output directory (can be symlink).
+#
+test-*.test
diff --git a/build2/buildfile b/build2/buildfile
index bd730c3..64935f3 100644
--- a/build2/buildfile
+++ b/build2/buildfile
@@ -5,15 +5,33 @@
import libs = libbutl%lib{butl}
import libs += libpkgconf%lib{pkgconf}
-exe{b}: cxx{b} libue{b}
+./: exe{b}: cxx{b} libue{b}
-libue{b}: {hxx ixx txx cxx}{** -b -b-options -config -version} \
- {hxx ixx cxx}{b-options} {hxx}{config version} \
+libue{b}: {hxx ixx txx cxx}{** -b -b-options -config -version -**.test...} \
+ {hxx ixx cxx}{b-options} {hxx}{config version} \
$libs
hxx{config}: in{config}
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)...
+ b = $path.base($name($t))
+
+ ./: $d/exe{$n}: $t $d/{hxx ixx txx}{+$n} $d/testscript{+$n +$b+*.test...}
+ $d/exe{$n}: libue{b}: bin.whole = false
+}
+
# Build options.
#
# Pass our compiler target to be used as build2 host.
diff --git a/unit-tests/cc/lexer/char-literal.testscript b/build2/cc/lexer+char-literal.test.testscript
index cbcb462..6a0a036 100644
--- a/unit-tests/cc/lexer/char-literal.testscript
+++ b/build2/cc/lexer+char-literal.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/cc/lexer/char-literal.testscript
+# file : build2/cc/lexer+char-literal.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/cc/lexer/comment.testscript b/build2/cc/lexer+comment.test.testscript
index 347c2e7..493c295 100644
--- a/unit-tests/cc/lexer/comment.testscript
+++ b/build2/cc/lexer+comment.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/cc/lexer/comment.testscript
+# file : build2/cc/lexer+comment.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/cc/lexer/line.testscript b/build2/cc/lexer+line.test.testscript
index 9dcd7e3..abcc587 100644
--- a/unit-tests/cc/lexer/line.testscript
+++ b/build2/cc/lexer+line.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/cc/lexer/line.testscript
+# file : build2/cc/lexer+line.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/cc/lexer/number.testscript b/build2/cc/lexer+number.test.testscript
index 0b4c888..c342818 100644
--- a/unit-tests/cc/lexer/number.testscript
+++ b/build2/cc/lexer+number.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/cc/lexer/number.testscript
+# file : build2/cc/lexer+number.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/cc/lexer/preprocessor.testscript b/build2/cc/lexer+preprocessor.test.testscript
index e826144..fc061cb 100644
--- a/unit-tests/cc/lexer/preprocessor.testscript
+++ b/build2/cc/lexer+preprocessor.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/cc/lexer/preprocessor.testscript
+# file : build2/cc/lexer+preprocessor.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/cc/lexer/raw-string-literal.testscript b/build2/cc/lexer+raw-string-literal.test.testscript
index 4ab08f7..e72d77b 100644
--- a/unit-tests/cc/lexer/raw-string-literal.testscript
+++ b/build2/cc/lexer+raw-string-literal.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/cc/lexer/raw-string-literal.testscript
+# file : build2/cc/lexer+raw-string-literal.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/cc/lexer/string-literal.testscript b/build2/cc/lexer+string-literal.test.testscript
index db3798f..c486aa1 100644
--- a/unit-tests/cc/lexer/string-literal.testscript
+++ b/build2/cc/lexer+string-literal.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/cc/lexer/string-literal.testscript
+# file : build2/cc/lexer+string-literal.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/cc/lexer/driver.cxx b/build2/cc/lexer.test.cxx
index ebbb9ab..a2e33b7 100644
--- a/unit-tests/cc/lexer/driver.cxx
+++ b/build2/cc/lexer.test.cxx
@@ -1,4 +1,4 @@
-// file : unit-tests/cc/lexer/driver.cxx -*- C++ -*-
+// file : build2/cc/lexer.test.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/cc/parser/module.testscript b/build2/cc/parser+module.test.testscript
index dc7f3e4..0e2e52e 100644
--- a/unit-tests/cc/parser/module.testscript
+++ b/build2/cc/parser+module.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/cc/parser/module.testscript
+# file : build2/cc/parser+module.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/cc/parser/driver.cxx b/build2/cc/parser.test.cxx
index 19a2133..ab42e31 100644
--- a/unit-tests/cc/parser/driver.cxx
+++ b/build2/cc/parser.test.cxx
@@ -1,4 +1,4 @@
-// file : unit-tests/cc/parser/driver.cxx -*- C++ -*-
+// file : build2/cc/parser.test.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/function/call.testscript b/build2/function+call.test.testscript
index 36234a1..1678c28 100644
--- a/unit-tests/function/call.testscript
+++ b/build2/function+call.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/function/call.testscript
+# file : build2/function+call.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/function/syntax.testscript b/build2/function+syntax.test.testscript
index 6af5f7e..bd86dd0 100644
--- a/unit-tests/function/syntax.testscript
+++ b/build2/function+syntax.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/function/syntax.testscript
+# file : build2/function+syntax.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/function/driver.cxx b/build2/function.test.cxx
index 0e128e7..a9ba7bb 100644
--- a/unit-tests/function/driver.cxx
+++ b/build2/function.test.cxx
@@ -1,4 +1,4 @@
-// file : unit-tests/function/driver.cxx -*- C++ -*-
+// file : build2/function.test.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/lexer/buildspec.testscript b/build2/lexer+buildspec.test.testscript
index 71568ae..9083abe 100644
--- a/unit-tests/lexer/buildspec.testscript
+++ b/build2/lexer+buildspec.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/lexer/buildspec.testscript
+# file : build2/lexer+buildspec.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/lexer/comment.testscript b/build2/lexer+comment.test.testscript
index 44e1866..4323c84 100644
--- a/unit-tests/lexer/comment.testscript
+++ b/build2/lexer+comment.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/lexer/comment.testscript
+# file : build2/lexer+comment.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/lexer/eval.testscript b/build2/lexer+eval.test.testscript
index 6768756..eccd029 100644
--- a/unit-tests/lexer/eval.testscript
+++ b/build2/lexer+eval.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/lexer/eval.testscript
+# file : build2/lexer+eval.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/lexer/quoting.testscript b/build2/lexer+quoting.test.testscript
index e9767f2..21b9046 100644
--- a/unit-tests/lexer/quoting.testscript
+++ b/build2/lexer+quoting.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/lexer/quoting.testscript
+# file : build2/lexer+quoting.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/lexer/driver.cxx b/build2/lexer.test.cxx
index a5cdb8d..8abd5f7 100644
--- a/unit-tests/lexer/driver.cxx
+++ b/build2/lexer.test.cxx
@@ -1,4 +1,4 @@
-// file : unit-tests/lexer/driver.cxx -*- C++ -*-
+// file : build2/lexer.test.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/name/driver.cxx b/build2/name.test.cxx
index 69d3e2d..0434aac 100644
--- a/unit-tests/name/driver.cxx
+++ b/build2/name.test.cxx
@@ -1,4 +1,4 @@
-// file : unit-tests/name/driver.cxx -*- C++ -*-
+// file : build2/name.test.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/scheduler/driver.cxx b/build2/scheduler.test.cxx
index 5f03523..b088c1d 100644
--- a/unit-tests/scheduler/driver.cxx
+++ b/build2/scheduler.test.cxx
@@ -1,4 +1,4 @@
-// file : unit-tests/scheduler/driver.cxx -*- C++ -*-
+// file : build2/scheduler.test.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/test/script/lexer/command-expansion.testscript b/build2/test/script/lexer+command-expansion.test.testscript
index 581e13c..03e3366 100644
--- a/unit-tests/test/script/lexer/command-expansion.testscript
+++ b/build2/test/script/lexer+command-expansion.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/test/script/lexer/command-expansion.testscript
+# file : build2/test/script/lexer+command-expansion.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/test/script/lexer/command-line.testscript b/build2/test/script/lexer+command-line.test.testscript
index 55344b3..65be837 100644
--- a/unit-tests/test/script/lexer/command-line.testscript
+++ b/build2/test/script/lexer+command-line.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/test/script/lexer/command-line.testscript
+# file : build2/test/script/lexer+command-line.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/test/script/lexer/description-line.testscript b/build2/test/script/lexer+description-line.test.testscript
index dc9fd9c..2d87d24 100644
--- a/unit-tests/test/script/lexer/description-line.testscript
+++ b/build2/test/script/lexer+description-line.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/test/script/lexer/description-line.testscript
+# file : build2/test/script/lexer+description-line.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/test/script/lexer/first-token.testscript b/build2/test/script/lexer+first-token.test.testscript
index 45cb085..f20f261 100644
--- a/unit-tests/test/script/lexer/first-token.testscript
+++ b/build2/test/script/lexer+first-token.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/test/script/lexer/first-token.testscript
+# file : build2/test/script/lexer+first-token.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/test/script/lexer/second-token.testscript b/build2/test/script/lexer+second-token.test.testscript
index e6a72d3..8fdee23 100644
--- a/unit-tests/test/script/lexer/second-token.testscript
+++ b/build2/test/script/lexer+second-token.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/test/script/lexer/second-token.testscript
+# file : build2/test/script/lexer+second-token.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/test/script/lexer/variable-line.testscript b/build2/test/script/lexer+variable-line.test.testscript
index ffbcefb..b9c558d 100644
--- a/unit-tests/test/script/lexer/variable-line.testscript
+++ b/build2/test/script/lexer+variable-line.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/test/script/lexer/variable-line.testscript
+# file : build2/test/script/lexer+variable-line.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/test/script/lexer/variable.testscript b/build2/test/script/lexer+variable.test.testscript
index 243a9c4..0ec323b 100644
--- a/unit-tests/test/script/lexer/variable.testscript
+++ b/build2/test/script/lexer+variable.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/test/script/lexer/variable.testscript
+# file : build2/test/script/lexer+variable.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/test/script/lexer/driver.cxx b/build2/test/script/lexer.test.cxx
index 14d142c..56418b7 100644
--- a/unit-tests/test/script/lexer/driver.cxx
+++ b/build2/test/script/lexer.test.cxx
@@ -1,4 +1,4 @@
-// file : unit-tests/test/script/lexer/driver.cxx -*- C++ -*-
+// file : build2/test/script/lexer.test.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/test/script/parser/cleanup.testscript b/build2/test/script/parser+cleanup.test.testscript
index 962fea0..2c94afc 100644
--- a/unit-tests/test/script/parser/cleanup.testscript
+++ b/build2/test/script/parser+cleanup.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/test/script/parser/cleanup.testscript
+# file : build2/test/script/parser+cleanup.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/test/script/parser/command-if.testscript b/build2/test/script/parser+command-if.test.testscript
index 274e81e..ab6e6d5 100644
--- a/unit-tests/test/script/parser/command-if.testscript
+++ b/build2/test/script/parser+command-if.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/test/script/parser/command-if.testscript
+# file : build2/test/script/parser+command-if.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/test/script/parser/command-re-parse.testscript b/build2/test/script/parser+command-re-parse.test.testscript
index 62a1c7b..ef030de 100644
--- a/unit-tests/test/script/parser/command-re-parse.testscript
+++ b/build2/test/script/parser+command-re-parse.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/test/script/parser/command-re-parse.testscript
+# file : build2/test/script/parser+command-re-parse.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/test/script/parser/description.testscript b/build2/test/script/parser+description.test.testscript
index 20e6ec0..7d840c3 100644
--- a/unit-tests/test/script/parser/description.testscript
+++ b/build2/test/script/parser+description.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/test/script/parser/description.testscript
+# file : build2/test/script/parser+description.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/test/script/parser/directive.testscript b/build2/test/script/parser+directive.test.testscript
index 0fc0b7a..addd874 100644
--- a/unit-tests/test/script/parser/directive.testscript
+++ b/build2/test/script/parser+directive.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/test/script/parser/directive.testscript
+# file : build2/test/script/parser+directive.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/test/script/parser/exit.testscript b/build2/test/script/parser+exit.test.testscript
index 75867d6..014afa4 100644
--- a/unit-tests/test/script/parser/exit.testscript
+++ b/build2/test/script/parser+exit.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/test/script/parser/exit.testscript
+# file : build2/test/script/parser+exit.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/test/script/parser/expansion.testscript b/build2/test/script/parser+expansion.test.testscript
index ea952af..71a21b3 100644
--- a/unit-tests/test/script/parser/expansion.testscript
+++ b/build2/test/script/parser+expansion.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/test/script/parser/expansion.testscript
+# file : build2/test/script/parser+expansion.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/test/script/parser/here-document.testscript b/build2/test/script/parser+here-document.test.testscript
index de6255e..5e99a26 100644
--- a/unit-tests/test/script/parser/here-document.testscript
+++ b/build2/test/script/parser+here-document.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/test/script/parser/here-document.testscript
+# file : build2/test/script/parser+here-document.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/test/script/parser/here-string.testscript b/build2/test/script/parser+here-string.test.testscript
index 012162c..16544df 100644
--- a/unit-tests/test/script/parser/here-string.testscript
+++ b/build2/test/script/parser+here-string.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/test/script/parser/here-string.testscript
+# file : build2/test/script/parser+here-string.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/test/script/parser/include.testscript b/build2/test/script/parser+include.test.testscript
index c5241a1..65be149 100644
--- a/unit-tests/test/script/parser/include.testscript
+++ b/build2/test/script/parser+include.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/test/script/parser/include.testscript
+# file : build2/test/script/parser+include.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/test/script/parser/pipe-expr.testscript b/build2/test/script/parser+pipe-expr.test.testscript
index a66a4ac..18eb660 100644
--- a/unit-tests/test/script/parser/pipe-expr.testscript
+++ b/build2/test/script/parser+pipe-expr.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/test/script/parser/pipe-expr.testscript
+# file : build2/test/script/parser+pipe-expr.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/test/script/parser/pre-parse.testscript b/build2/test/script/parser+pre-parse.test.testscript
index 1afd566..7d9eb6c 100644
--- a/unit-tests/test/script/parser/pre-parse.testscript
+++ b/build2/test/script/parser+pre-parse.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/test/script/parser/pre-parse.testscript
+# file : build2/test/script/parser+pre-parse.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/test/script/parser/redirect.testscript b/build2/test/script/parser+redirect.test.testscript
index 09074cd..b0b967a 100644
--- a/unit-tests/test/script/parser/redirect.testscript
+++ b/build2/test/script/parser+redirect.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/test/script/parser/redirect.testscript
+# file : build2/test/script/parser+redirect.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/test/script/parser/regex.testscript b/build2/test/script/parser+regex.test.testscript
index 216c0c4..031492e 100644
--- a/unit-tests/test/script/parser/regex.testscript
+++ b/build2/test/script/parser+regex.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/test/script/parser/regex.testscript
+# file : build2/test/script/parser+regex.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/test/script/parser/scope-if.testscript b/build2/test/script/parser+scope-if.test.testscript
index 461d902..faae297 100644
--- a/unit-tests/test/script/parser/scope-if.testscript
+++ b/build2/test/script/parser+scope-if.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/test/script/parser/scope-if.testscript
+# file : build2/test/script/parser+scope-if.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/test/script/parser/scope.testscript b/build2/test/script/parser+scope.test.testscript
index cc254e9..9147161 100644
--- a/unit-tests/test/script/parser/scope.testscript
+++ b/build2/test/script/parser+scope.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/test/script/parser/scope.testscript
+# file : build2/test/script/parser+scope.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/test/script/parser/setup-teardown.testscript b/build2/test/script/parser+setup-teardown.test.testscript
index 0342e73..9d67309 100644
--- a/unit-tests/test/script/parser/setup-teardown.testscript
+++ b/build2/test/script/parser+setup-teardown.test.testscript
@@ -1,4 +1,4 @@
-# file : unit-tests/test/script/parser/setup-teardown.testscript
+# file : build2/test/script/parser+setup-teardown.test.testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/test/script/parser/driver.cxx b/build2/test/script/parser.test.cxx
index d17c76b..1862f98 100644
--- a/unit-tests/test/script/parser/driver.cxx
+++ b/build2/test/script/parser.test.cxx
@@ -1,4 +1,4 @@
-// file : unit-tests/test/script/parser/driver.cxx -*- C++ -*-
+// file : build2/test/script/parser.test.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
diff --git a/unit-tests/test/script/regex/driver.cxx b/build2/test/script/regex.test.cxx
index cc7a2be..7b89e4d 100644
--- a/unit-tests/test/script/regex/driver.cxx
+++ b/build2/test/script/regex.test.cxx
@@ -1,4 +1,4 @@
-// file : unit-tests/test/script/regex/driver.cxx -*- C++ -*-
+// file : build2/test/script/regex.test.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
diff --git a/buildfile b/buildfile
index 5828d9d..fa23190 100644
--- a/buildfile
+++ b/buildfile
@@ -9,5 +9,4 @@
# Don't install tests or the INSTALL file.
#
tests/: install = false
-unit-tests/: install = false
doc{INSTALL}@./: install = false
diff --git a/unit-tests/.gitignore b/unit-tests/.gitignore
deleted file mode 100644
index ababe77..0000000
--- a/unit-tests/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-driver
-
-# The immediate test/ sub-directory shouldn't be ignored.
-#
-*/**/test/
-test-*/
diff --git a/unit-tests/cc/lexer/buildfile b/unit-tests/cc/lexer/buildfile
deleted file mode 100644
index 4eaef44..0000000
--- a/unit-tests/cc/lexer/buildfile
+++ /dev/null
@@ -1,6 +0,0 @@
-# file : unit-tests/cc/lexer/buildfile
-# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
-# license : MIT; see accompanying LICENSE file
-
-include ../../../build2/
-exe{driver}: {hxx cxx}{*} ../../../build2/libue{b} testscript{*}
diff --git a/unit-tests/cc/parser/buildfile b/unit-tests/cc/parser/buildfile
deleted file mode 100644
index d9e3e28..0000000
--- a/unit-tests/cc/parser/buildfile
+++ /dev/null
@@ -1,6 +0,0 @@
-# file : unit-tests/cc/parser/buildfile
-# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
-# license : MIT; see accompanying LICENSE file
-
-include ../../../build2/
-exe{driver}: {hxx cxx}{*} ../../../build2/libue{b} testscript{*}
diff --git a/unit-tests/function/buildfile b/unit-tests/function/buildfile
deleted file mode 100644
index 68dae02..0000000
--- a/unit-tests/function/buildfile
+++ /dev/null
@@ -1,6 +0,0 @@
-# file : unit-tests/function/buildfile
-# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
-# license : MIT; see accompanying LICENSE file
-
-include ../../build2/
-exe{driver}: {hxx cxx}{*} ../../build2/libue{b} testscript{*}
diff --git a/unit-tests/lexer/buildfile b/unit-tests/lexer/buildfile
deleted file mode 100644
index b7cc4c6..0000000
--- a/unit-tests/lexer/buildfile
+++ /dev/null
@@ -1,6 +0,0 @@
-# file : unit-tests/lexer/buildfile
-# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
-# license : MIT; see accompanying LICENSE file
-
-include ../../build2/
-exe{driver}: {hxx cxx}{*} ../../build2/libue{b} testscript{*}
diff --git a/unit-tests/name/buildfile b/unit-tests/name/buildfile
deleted file mode 100644
index dfd729e..0000000
--- a/unit-tests/name/buildfile
+++ /dev/null
@@ -1,6 +0,0 @@
-# file : unit-tests/name/buildfile
-# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
-# license : MIT; see accompanying LICENSE file
-
-include ../../build2/
-exe{driver}: {hxx cxx}{*} ../../build2/libue{b}
diff --git a/unit-tests/scheduler/buildfile b/unit-tests/scheduler/buildfile
deleted file mode 100644
index c666bb1..0000000
--- a/unit-tests/scheduler/buildfile
+++ /dev/null
@@ -1,6 +0,0 @@
-# file : unit-tests/scheduler/buildfile
-# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
-# license : MIT; see accompanying LICENSE file
-
-include ../../build2/
-exe{driver}: {hxx cxx}{*} ../../build2/libue{b}
diff --git a/unit-tests/test/script/lexer/buildfile b/unit-tests/test/script/lexer/buildfile
deleted file mode 100644
index 190d586..0000000
--- a/unit-tests/test/script/lexer/buildfile
+++ /dev/null
@@ -1,6 +0,0 @@
-# file : unit-tests/test/script/lexer/buildfile
-# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
-# license : MIT; see accompanying LICENSE file
-
-include ../../../../build2/
-exe{driver}: {hxx cxx}{*} ../../../../build2/libue{b} testscript{*}
diff --git a/unit-tests/test/script/parser/buildfile b/unit-tests/test/script/parser/buildfile
deleted file mode 100644
index 952ec7a..0000000
--- a/unit-tests/test/script/parser/buildfile
+++ /dev/null
@@ -1,6 +0,0 @@
-# file : unit-tests/test/script/parser/buildfile
-# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
-# license : MIT; see accompanying LICENSE file
-
-include ../../../../build2/
-exe{driver}: {hxx cxx}{*} ../../../../build2/libue{b} testscript{*}
diff --git a/unit-tests/test/script/regex/buildfile b/unit-tests/test/script/regex/buildfile
deleted file mode 100644
index eb5394e..0000000
--- a/unit-tests/test/script/regex/buildfile
+++ /dev/null
@@ -1,6 +0,0 @@
-# file : unit-tests/test/script/regex/buildfile
-# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
-# license : MIT; see accompanying LICENSE file
-
-include ../../../../build2/
-exe{driver}: {hxx cxx}{*} ../../../../build2/libue{b}