diff options
-rw-r--r-- | bbot/.gitignore | 7 | ||||
-rw-r--r-- | bbot/bootstrap-manifest.test.cxx (renamed from unit-tests/bootstrap-manifest/driver.cxx) | 2 | ||||
-rw-r--r-- | bbot/bootstrap-manifest.test.testscript (renamed from unit-tests/bootstrap-manifest/testscript) | 2 | ||||
-rw-r--r-- | bbot/buildfile | 43 | ||||
-rw-r--r-- | bbot/machine-manifest.test.cxx (renamed from unit-tests/machine-manifest/driver.cxx) | 2 | ||||
-rw-r--r-- | bbot/machine-manifest.test.testscript (renamed from unit-tests/machine-manifest/testscript) | 2 | ||||
-rw-r--r-- | build/root.build | 6 | ||||
-rw-r--r-- | buildfile | 1 | ||||
-rw-r--r-- | unit-tests/.gitignore | 3 | ||||
-rw-r--r-- | unit-tests/bootstrap-manifest/buildfile | 6 | ||||
-rw-r--r-- | unit-tests/machine-manifest/buildfile | 6 |
11 files changed, 45 insertions, 35 deletions
diff --git a/bbot/.gitignore b/bbot/.gitignore index e7ffd50..bed4dc1 100644 --- a/bbot/.gitignore +++ b/bbot/.gitignore @@ -1,4 +1,9 @@ -*-options.?xx bbot-agent bbot-worker +*.test +*-options.?xx version.hxx + +# Testscript output directory (can be symlink). +# +test-*.test diff --git a/unit-tests/bootstrap-manifest/driver.cxx b/bbot/bootstrap-manifest.test.cxx index b40f154..da41fd7 100644 --- a/unit-tests/bootstrap-manifest/driver.cxx +++ b/bbot/bootstrap-manifest.test.cxx @@ -1,4 +1,4 @@ -// file : unit-tests/bootstrap-manifest/driver.cxx -*- C++ -*- +// file : bbot/bootstrap-manifest.test.cxx -*- C++ -*- // copyright : Copyright (c) 2014-2019 Code Synthesis Ltd // license : TBC; see accompanying LICENSE file diff --git a/unit-tests/bootstrap-manifest/testscript b/bbot/bootstrap-manifest.test.testscript index ef7cb78..626497c 100644 --- a/unit-tests/bootstrap-manifest/testscript +++ b/bbot/bootstrap-manifest.test.testscript @@ -1,4 +1,4 @@ -# file : unit-tests/bootstrap-manifest/testscript +# file : bbot/bootstrap-manifest.test.testscript # copyright : Copyright (c) 2014-2019 Code Synthesis Ltd # license : TBC; see accompanying LICENSE file diff --git a/bbot/buildfile b/bbot/buildfile index dbb32c6..3925585 100644 --- a/bbot/buildfile +++ b/bbot/buildfile @@ -28,22 +28,49 @@ if ($cxx.target.class == "linux") { ./: exe{bbot-agent} service{'bbot-agent@'} - exe{bbot-agent}: agent/{hxx ixx txx cxx}{* -agent-options} \ - agent/{hxx ixx cxx}{agent-options} libue{bbot} + exe{bbot-agent}: agent/cxx{agent} agent/libue{bbot} + + agent/ + { + libue{bbot}: {hxx ixx txx cxx}{* -agent -agent-options -*.test...} \ + {hxx ixx cxx}{agent-options} \ + ../libue{bbot} + } } -./: exe{bbot-worker} +./: exe{bbot-worker}: worker/cxx{worker} worker/libue{bbot} -exe{bbot-worker}: worker/{hxx ixx txx cxx}{* -worker-options} \ - worker/{hxx ixx cxx}{worker-options} libue{bbot} + worker/ +{ + libue{bbot}: {hxx ixx txx cxx}{* -worker -worker-options -*.test...} \ + {hxx ixx cxx}{worker-options} \ + ../libue{bbot} +} -libue{bbot}: bin.whole = false -libue{bbot}: {hxx ixx txx cxx}{* -common-options -version} \ - {hxx ixx cxx}{common-options} {hxx}{version} \ +libue{bbot}: {hxx ixx txx cxx}{* -common-options -version -*.test...} \ + {hxx ixx cxx}{common-options} \ + {hxx}{version} \ $libs 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}: $d/libue{bbot}: bin.whole = false +} + # Generated options parser. # if $cli.configured diff --git a/unit-tests/machine-manifest/driver.cxx b/bbot/machine-manifest.test.cxx index ddaa8db..c1287dc 100644 --- a/unit-tests/machine-manifest/driver.cxx +++ b/bbot/machine-manifest.test.cxx @@ -1,4 +1,4 @@ -// file : unit-tests/machine-manifest/driver.cxx -*- C++ -*- +// file : bbot/machine-manifest.test.cxx -*- C++ -*- // copyright : Copyright (c) 2014-2019 Code Synthesis Ltd // license : TBC; see accompanying LICENSE file diff --git a/unit-tests/machine-manifest/testscript b/bbot/machine-manifest.test.testscript index a83d128..fe8c59a 100644 --- a/unit-tests/machine-manifest/testscript +++ b/bbot/machine-manifest.test.testscript @@ -1,4 +1,4 @@ -# file : unit-tests/machine-manifest/testscript +# file : bbot/machine-manifest.test.testscript # copyright : Copyright (c) 2014-2019 Code Synthesis Ltd # license : TBC; see accompanying LICENSE file diff --git a/build/root.build b/build/root.build index fd927a6..f89bd4c 100644 --- a/build/root.build +++ b/build/root.build @@ -27,12 +27,6 @@ cxx.poptions =+ "-I$out_root" "-I$src_root" # 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 @@ -7,5 +7,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 2e508a9..0000000 --- a/unit-tests/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -driver -test/ -test-*/ diff --git a/unit-tests/bootstrap-manifest/buildfile b/unit-tests/bootstrap-manifest/buildfile deleted file mode 100644 index 5fda6e2..0000000 --- a/unit-tests/bootstrap-manifest/buildfile +++ /dev/null @@ -1,6 +0,0 @@ -# file : unit-tests/bootstrap-manifest/buildfile -# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd -# license : TBC; see accompanying LICENSE file - -include ../../bbot/ -exe{driver}: {hxx cxx}{*} ../../bbot/libue{bbot} testscript diff --git a/unit-tests/machine-manifest/buildfile b/unit-tests/machine-manifest/buildfile deleted file mode 100644 index 70f613c..0000000 --- a/unit-tests/machine-manifest/buildfile +++ /dev/null @@ -1,6 +0,0 @@ -# file : unit-tests/machine-manifest/buildfile -# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd -# license : TBC; see accompanying LICENSE file - -include ../../bbot/ -exe{driver}: {hxx cxx}{*} ../../bbot/libue{bbot} testscript |