summaryrefslogtreecommitdiff
path: root/odb/tests
diff options
context:
space:
mode:
Diffstat (limited to 'odb/tests')
-rw-r--r--odb/tests/.gitignore2
-rw-r--r--odb/tests/build/.gitignore3
-rw-r--r--odb/tests/build/bootstrap.build8
-rw-r--r--odb/tests/build/root.build16
-rw-r--r--odb/tests/buildfile4
-rw-r--r--odb/tests/testscript21
6 files changed, 54 insertions, 0 deletions
diff --git a/odb/tests/.gitignore b/odb/tests/.gitignore
new file mode 100644
index 0000000..35ec43f
--- /dev/null
+++ b/odb/tests/.gitignore
@@ -0,0 +1,2 @@
+test/
+test-*/
diff --git a/odb/tests/build/.gitignore b/odb/tests/build/.gitignore
new file mode 100644
index 0000000..4a730a3
--- /dev/null
+++ b/odb/tests/build/.gitignore
@@ -0,0 +1,3 @@
+config.build
+root/
+bootstrap/
diff --git a/odb/tests/build/bootstrap.build b/odb/tests/build/bootstrap.build
new file mode 100644
index 0000000..5e48571
--- /dev/null
+++ b/odb/tests/build/bootstrap.build
@@ -0,0 +1,8 @@
+# file : tests/build/bootstrap.build
+# license : GNU GPL v3; see accompanying LICENSE file
+
+project = # Unnamed subproject.
+
+using config
+using dist
+using test
diff --git a/odb/tests/build/root.build b/odb/tests/build/root.build
new file mode 100644
index 0000000..0995b7b
--- /dev/null
+++ b/odb/tests/build/root.build
@@ -0,0 +1,16 @@
+# file : tests/build/root.build
+# license : GNU GPL v3; see accompanying LICENSE file
+
+# We need to configure C++ module to obtain the target information (see
+# below).
+#
+using cxx.config
+
+# Import the ODB compiler we will be testing.
+#
+import! [metadata] odb = odb%exe{odb}
+testscript{*}: test = $odb
+
+# Specify the test target for cross-testing.
+#
+test.target = $cxx.target
diff --git a/odb/tests/buildfile b/odb/tests/buildfile
new file mode 100644
index 0000000..80a4e67
--- /dev/null
+++ b/odb/tests/buildfile
@@ -0,0 +1,4 @@
+# file : tests/buildfile
+# license : GNU GPL v3; see accompanying LICENSE file
+
+./: testscript $odb
diff --git a/odb/tests/testscript b/odb/tests/testscript
new file mode 100644
index 0000000..5448eca
--- /dev/null
+++ b/odb/tests/testscript
@@ -0,0 +1,21 @@
+# file : tests/testscript
+# license : GNU GPL v3; see accompanying LICENSE file
+
+: version
+:
+$* --version >>~/EOO/
+/ODB object-relational mapping \(ORM\) compiler for C\+\+ .+/
+/.*/*
+EOO
+
+: plugin
+:
+: To actually compile anything we need libodb. However, we can smoke-test the
+: plugin loading and invocation using the --trace option that suppresses the
+: standard prologue/epilogue (which includes the libodb headers).
+:
+cat <'// dummy' >=dummy.hxx;
+$* -d sqlite --trace dummy.hxx 2>>~/EOE/ != 0
+/.*/*
+dummy.hxx: error: unable to resolve odb namespace
+EOE