diff options
-rw-r--r-- | build/export.build | 15 | ||||
-rw-r--r-- | build/root.build | 3 | ||||
-rw-r--r-- | tests/agent/buildfile | 8 | ||||
-rw-r--r-- | tests/build/.gitignore | 1 | ||||
-rw-r--r-- | tests/build/bootstrap.build | 9 | ||||
-rw-r--r-- | tests/build/root.build | 7 | ||||
-rw-r--r-- | tests/buildfile | 5 | ||||
-rw-r--r-- | tests/integration/buildfile | 9 | ||||
-rw-r--r-- | tests/integration/testscript | 2 | ||||
-rw-r--r-- | tests/machine/buildfile | 8 | ||||
-rw-r--r-- | tests/worker/buildfile | 8 |
11 files changed, 60 insertions, 15 deletions
diff --git a/build/export.build b/build/export.build new file mode 100644 index 0000000..8cd1646 --- /dev/null +++ b/build/export.build @@ -0,0 +1,15 @@ +# file : build/export.build +# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +# license : TBC; see accompanying LICENSE file + +$out_root/: +{ + include bbot/ +} + +if ($import.target == exe{bbot-agent}) + export $out_root/bbot/exe{bbot-agent} +elif ($import.target == exe{bbot-worker}) + export $out_root/bbot/exe{bbot-worker} +else + assert false unknown target $import.target diff --git a/build/root.build b/build/root.build index 4661de1..f63ff10 100644 --- a/build/root.build +++ b/build/root.build @@ -21,9 +21,8 @@ cxx.poptions =+ "-I$out_root" "-I$src_root" # using? cli -# All exe{} in tests/ and unit-tests/ are, well, tests. +# All exe{} in unit-tests/ are, well, tests. # -tests/exe{*}: test = true unit-tests/exe{*}: test = true # Specify the test target for cross-testing. diff --git a/tests/agent/buildfile b/tests/agent/buildfile index 7e93da0..3dc4ef5 100644 --- a/tests/agent/buildfile +++ b/tests/agent/buildfile @@ -2,7 +2,9 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : TBC; see accompanying LICENSE file -./: ../../bbot/exe{bbot-agent} test{testscript} file{btrfs-cpdir btrfs-rmdir} -dir{./}: test = ../../bbot/exe{bbot-agent} +# Setup the bbot-agent that we are testing. +# +import agent = bbot%exe{bbot-agent} -include ../../bbot/ +./: test{testscript} file{btrfs-cpdir btrfs-rmdir} $agent +dir{./}: test = $agent diff --git a/tests/build/.gitignore b/tests/build/.gitignore new file mode 100644 index 0000000..225c27f --- /dev/null +++ b/tests/build/.gitignore @@ -0,0 +1 @@ +config.build diff --git a/tests/build/bootstrap.build b/tests/build/bootstrap.build new file mode 100644 index 0000000..23281ac --- /dev/null +++ b/tests/build/bootstrap.build @@ -0,0 +1,9 @@ +# file : tests/build/bootstrap.build +# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +# license : TBC; see accompanying LICENSE file + +project = # Unnamed subproject. + +using config +using dist +using test diff --git a/tests/build/root.build b/tests/build/root.build new file mode 100644 index 0000000..588bc62 --- /dev/null +++ b/tests/build/root.build @@ -0,0 +1,7 @@ +# file : tests/build/root.build +# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +# license : TBC; see accompanying LICENSE file + +# Specify the test target for cross-testing. +# +test.target = $cxx.target diff --git a/tests/buildfile b/tests/buildfile new file mode 100644 index 0000000..e90a9db --- /dev/null +++ b/tests/buildfile @@ -0,0 +1,5 @@ +# file : tests/buildfile +# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +# license : TBC; see accompanying LICENSE file + +./: {*/ -build/} diff --git a/tests/integration/buildfile b/tests/integration/buildfile index f054694..2f33955 100644 --- a/tests/integration/buildfile +++ b/tests/integration/buildfile @@ -2,7 +2,10 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : TBC; see accompanying LICENSE file -./: ../../bbot/exe{bbot-agent bbot-worker} test{testscript} file{tftp-map} -dir{./}: test = ../../bbot/exe{bbot-agent} +# Setup the bbot-agent and bbot-worker that we are testing. +# +import agent = bbot%exe{bbot-agent} +import worker = bbot%exe{bbot-worker} -include ../../bbot/ +./: test{testscript} file{tftp-map} $agent $worker +dir{./}: test = $agent diff --git a/tests/integration/testscript b/tests/integration/testscript index bf66324..fcb3b19 100644 --- a/tests/integration/testscript +++ b/tests/integration/testscript @@ -49,7 +49,7 @@ controller = --fake-request ../task --dump-result pkg = hello ver = 1.0.0 -rep = https://build2.org/pkg/1/stage/stable +rep = https://build2.org/pkg/1/hello/stable rfp = FF:DF:7D:38:67:4E:C3:82:65:7E:EE:1F:D4:80:EC:56:C4:33:5B:65:3F:9B:29:9A:30:56:B9:77:B9:F2:01:94 +cat <<"EOI" >=task : 1 diff --git a/tests/machine/buildfile b/tests/machine/buildfile index a9f6ac3..fb532fc 100644 --- a/tests/machine/buildfile +++ b/tests/machine/buildfile @@ -2,7 +2,9 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : TBC; see accompanying LICENSE file -./: ../../bbot/exe{bbot-agent} test{testscript} -dir{./}: test = ../../bbot/exe{bbot-agent} +# Setup the bbot-agent that we are testing. +# +import agent = bbot%exe{bbot-agent} -include ../../bbot/ +./: test{testscript} $agent +dir{./}: test = $agent diff --git a/tests/worker/buildfile b/tests/worker/buildfile index 7d0a206..0b2b35e 100644 --- a/tests/worker/buildfile +++ b/tests/worker/buildfile @@ -20,7 +20,9 @@ sudo /usr/sbin/in.tftpd \ #\ -./: ../../bbot/exe{bbot-worker} test{bootstrap startup build} -dir{./}: test = ../../bbot/exe{bbot-worker} +# Setup the bbot-worker that we are testing. +# +import worker = bbot%exe{bbot-worker} -include ../../bbot/ +./: test{*} $worker +dir{./}: test = $worker |