summaryrefslogtreecommitdiff
path: root/odb-tests/oracle/types/buildfile
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2024-04-29 18:55:24 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2024-05-03 14:33:32 +0300
commit41727cc1aa49780199f50291f82653a721a5a304 (patch)
tree6c99e481a4492eed10552c2ef8db88323083775d /odb-tests/oracle/types/buildfile
parent68ff3d1fa1c8eb86bf89b7b9cbad78a45f362672 (diff)
Add support for testing of libodb-oracle to odb-tests
Diffstat (limited to 'odb-tests/oracle/types/buildfile')
-rw-r--r--odb-tests/oracle/types/buildfile35
1 files changed, 35 insertions, 0 deletions
diff --git a/odb-tests/oracle/types/buildfile b/odb-tests/oracle/types/buildfile
new file mode 100644
index 0000000..ff8eb8d
--- /dev/null
+++ b/odb-tests/oracle/types/buildfile
@@ -0,0 +1,35 @@
+# file : oracle/types/buildfile
+# license : GNU GPL v2; see accompanying LICENSE file
+
+if ($build.meta_operation != 'dist')
+{
+ assert ($oracle) "oracle should be configured for this test"
+ assert (!$multi) "multi-database mode is not supported by this test"
+}
+
+import libodb = libodb%lib{odb}
+
+import libs = libodb-oracle%lib{odb-oracle}
+import libs += lib{common}
+
+exe{driver}: {hxx cxx}{* -*-odb} {hxx ixx cxx}{test-odb} testscript
+
+# Introduce the metadata library target to make sure the libodb library is
+# resolved for the odb_compile ad hoc rule (see build/root.build for details).
+#
+libue{test-meta}: $libodb
+
+<{hxx ixx cxx}{test-odb}>: hxx{test} libue{test-meta}
+
+exe{driver}: libue{test-meta} $libs
+
+# Specify the ODB custom options to be used by the odb_compile ad hoc rule
+# (see build/root.build for details).
+#
+odb_options = --table-prefix oracle_types_ \
+ --generate-schema \
+ --default-database common \
+ --generate-query \
+ --hxx-prologue '#include "traits.hxx"'
+
+cxx.poptions =+ "-I$out_base" "-I$src_base"