diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-07-31 12:52:20 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-07-31 12:52:20 +0200 |
commit | bbd0f3bb21442a2833916110cbe8e9a07e9f4c1f (patch) | |
tree | d25de6f2bcfa4b6cabe1fd55a1b8f508005de4c1 /tests | |
parent | 729b56300c441a0d63c7d2013eb5a881211d352b (diff) |
Essential install module functionality
Diffstat (limited to 'tests')
-rw-r--r-- | tests/.gitignore | 1 | ||||
-rw-r--r-- | tests/install/lib/libtest/build/bootstrap.build | 5 | ||||
-rw-r--r-- | tests/install/lib/libtest/build/export.build | 6 | ||||
-rw-r--r-- | tests/install/lib/libtest/build/root.build | 11 | ||||
-rw-r--r-- | tests/install/lib/libtest/buildfile | 3 | ||||
-rw-r--r-- | tests/install/lib/libtest/doc/buildfile | 1 | ||||
-rw-r--r-- | tests/install/lib/libtest/doc/test.1 | 5 | ||||
-rw-r--r-- | tests/install/lib/libtest/doc/test.txt | 1 | ||||
-rw-r--r-- | tests/install/lib/libtest/test/buildfile | 10 | ||||
-rw-r--r-- | tests/install/lib/libtest/test/driver.cxx | 4 | ||||
-rw-r--r-- | tests/install/lib/libtest/test/driver.hxx | 0 | ||||
-rw-r--r-- | tests/install/lib/libtest/test/utility.cxx | 6 | ||||
-rw-r--r-- | tests/install/lib/libtest/test/utility.hxx | 5 | ||||
-rw-r--r-- | tests/install/lib/libtest/tests/buildfile | 2 | ||||
-rw-r--r-- | tests/install/lib/libtest/tests/driver.cxx | 3 | ||||
-rw-r--r-- | tests/install/simple/buildfile | 3 | ||||
-rw-r--r-- | tests/install/simple/driver.cxx | 3 | ||||
-rw-r--r-- | tests/install/simple/utility.hxx | 2 |
18 files changed, 69 insertions, 2 deletions
diff --git a/tests/.gitignore b/tests/.gitignore index d22ca88..c8ad1f0 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -1,4 +1,5 @@ driver +config.build # Temporary out-of-tree build directories. # diff --git a/tests/install/lib/libtest/build/bootstrap.build b/tests/install/lib/libtest/build/bootstrap.build new file mode 100644 index 0000000..0e83554 --- /dev/null +++ b/tests/install/lib/libtest/build/bootstrap.build @@ -0,0 +1,5 @@ +project = install-lib-libtest +amalgamation = # Disabled. +using config +using install +using test diff --git a/tests/install/lib/libtest/build/export.build b/tests/install/lib/libtest/build/export.build new file mode 100644 index 0000000..e8b12b3 --- /dev/null +++ b/tests/install/lib/libtest/build/export.build @@ -0,0 +1,6 @@ +$out_root/: +{ + include test/ +} + +export $out_root/test/lib{test} diff --git a/tests/install/lib/libtest/build/root.build b/tests/install/lib/libtest/build/root.build new file mode 100644 index 0000000..59c1e37 --- /dev/null +++ b/tests/install/lib/libtest/build/root.build @@ -0,0 +1,11 @@ +using cxx + +hxx.ext = hxx +ixx.ext = ixx +cxx.ext = cxx + +tests/: +{ + test.exe = true + install = false +} diff --git a/tests/install/lib/libtest/buildfile b/tests/install/lib/libtest/buildfile new file mode 100644 index 0000000..021f51e --- /dev/null +++ b/tests/install/lib/libtest/buildfile @@ -0,0 +1,3 @@ +d = doc/ test/ tests/ +.: $d +include $d diff --git a/tests/install/lib/libtest/doc/buildfile b/tests/install/lib/libtest/doc/buildfile new file mode 100644 index 0000000..117395b --- /dev/null +++ b/tests/install/lib/libtest/doc/buildfile @@ -0,0 +1 @@ +.: doc{test.txt} man1{test} diff --git a/tests/install/lib/libtest/doc/test.1 b/tests/install/lib/libtest/doc/test.1 new file mode 100644 index 0000000..0a32f2b --- /dev/null +++ b/tests/install/lib/libtest/doc/test.1 @@ -0,0 +1,5 @@ +.TH TEST 1 +.SH NAME +test \- this is a test +.SH SYNOPSIS +.B test-driver diff --git a/tests/install/lib/libtest/doc/test.txt b/tests/install/lib/libtest/doc/test.txt new file mode 100644 index 0000000..484ba93 --- /dev/null +++ b/tests/install/lib/libtest/doc/test.txt @@ -0,0 +1 @@ +This is a test. diff --git a/tests/install/lib/libtest/test/buildfile b/tests/install/lib/libtest/test/buildfile new file mode 100644 index 0000000..5e275c6 --- /dev/null +++ b/tests/install/lib/libtest/test/buildfile @@ -0,0 +1,10 @@ +cxx.poptions += -I$src_root + +install.include = $install.include/test + +lib{test}: cxx{utility} hxx{utility} +lib{test}: cxx.export.poptions = -I$src_root + +exe{driver}: cxx{driver} hxx{driver} lib{test} + +.: lib{test} exe{driver} diff --git a/tests/install/lib/libtest/test/driver.cxx b/tests/install/lib/libtest/test/driver.cxx new file mode 100644 index 0000000..fbb6643 --- /dev/null +++ b/tests/install/lib/libtest/test/driver.cxx @@ -0,0 +1,4 @@ +#include <test/utility.hxx> +#include "driver.hxx" + +int main () {return test::f ();} diff --git a/tests/install/lib/libtest/test/driver.hxx b/tests/install/lib/libtest/test/driver.hxx new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/install/lib/libtest/test/driver.hxx diff --git a/tests/install/lib/libtest/test/utility.cxx b/tests/install/lib/libtest/test/utility.cxx new file mode 100644 index 0000000..2016b45 --- /dev/null +++ b/tests/install/lib/libtest/test/utility.cxx @@ -0,0 +1,6 @@ +#include <test/utility.hxx> + +namespace test +{ + int f () {return 0;} +} diff --git a/tests/install/lib/libtest/test/utility.hxx b/tests/install/lib/libtest/test/utility.hxx new file mode 100644 index 0000000..1a9dd72 --- /dev/null +++ b/tests/install/lib/libtest/test/utility.hxx @@ -0,0 +1,5 @@ +namespace test +{ + int f (); +} + diff --git a/tests/install/lib/libtest/tests/buildfile b/tests/install/lib/libtest/tests/buildfile new file mode 100644 index 0000000..72d549a --- /dev/null +++ b/tests/install/lib/libtest/tests/buildfile @@ -0,0 +1,2 @@ +exe{driver}: cxx{driver} ../test/lib{test} +include ../test/ diff --git a/tests/install/lib/libtest/tests/driver.cxx b/tests/install/lib/libtest/tests/driver.cxx new file mode 100644 index 0000000..9a12f9d --- /dev/null +++ b/tests/install/lib/libtest/tests/driver.cxx @@ -0,0 +1,3 @@ +#include <test/utility.hxx> + +int main () {return test::f ();} diff --git a/tests/install/simple/buildfile b/tests/install/simple/buildfile index 986f391..cc11491 100644 --- a/tests/install/simple/buildfile +++ b/tests/install/simple/buildfile @@ -3,4 +3,5 @@ using cxx hxx.ext = hxx cxx.ext = cxx -exe{driver}: cxx{driver} +exe{driver}: cxx{driver} hxx{utility} +exe{driver}: install = sbin diff --git a/tests/install/simple/driver.cxx b/tests/install/simple/driver.cxx index a444f13..1b28c94 100644 --- a/tests/install/simple/driver.cxx +++ b/tests/install/simple/driver.cxx @@ -1,2 +1,3 @@ -int main () {} +#include "utility.hxx" +int main () {return result;} diff --git a/tests/install/simple/utility.hxx b/tests/install/simple/utility.hxx new file mode 100644 index 0000000..1b8e18e --- /dev/null +++ b/tests/install/simple/utility.hxx @@ -0,0 +1,2 @@ +const int result = 0; + |