diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2024-01-25 20:32:06 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2024-01-25 20:32:06 +0300 |
commit | 0d49ea1fe08cf1eab41a00149393a291c65a59d7 (patch) | |
tree | 0391eb09309ca95282e200516937e64d89f3e1bb /common/include | |
parent | fc3fb39c90ab7fe5fccbe3f3bc0eb2645157bb96 (diff) |
Turn odb-tests repository into package for muti-package repositoryodb-tests
Diffstat (limited to 'common/include')
-rw-r--r-- | common/include/.gitignore | 17 | ||||
-rw-r--r-- | common/include/buildfile | 51 | ||||
-rw-r--r-- | common/include/driver.cxx | 42 | ||||
-rw-r--r-- | common/include/obj1.hxx | 25 | ||||
-rw-r--r-- | common/include/obj2.hxx | 25 | ||||
-rw-r--r-- | common/include/obj3.hxx | 25 | ||||
-rw-r--r-- | common/include/objs1.hxx | 13 | ||||
-rw-r--r-- | common/include/objs2.hxx | 13 | ||||
-rw-r--r-- | common/include/objs3.hxx | 11 | ||||
-rw-r--r-- | common/include/objs4.hxx | 11 | ||||
-rw-r--r-- | common/include/test1.hxx | 16 | ||||
-rw-r--r-- | common/include/test2.hxx | 15 | ||||
-rw-r--r-- | common/include/test3.hxx | 12 | ||||
-rw-r--r-- | common/include/test4.hxx | 12 | ||||
-rw-r--r-- | common/include/testscript | 31 |
15 files changed, 0 insertions, 319 deletions
diff --git a/common/include/.gitignore b/common/include/.gitignore deleted file mode 100644 index d52f166..0000000 --- a/common/include/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -# ODB-generated files. -# -obj1-odb.?xx -obj1-odb-*.?xx -obj2-odb.?xx -obj2-odb-*.?xx -obj3-odb.?xx -obj3-odb-*.?xx - -test1-odb.?xx -test1-odb-*.?xx -test2-odb.?xx -test2-odb-*.?xx -test3-odb.?xx -test3-odb-*.?xx -test4-odb.?xx -test4-odb-*.?xx diff --git a/common/include/buildfile b/common/include/buildfile deleted file mode 100644 index 6db878c..0000000 --- a/common/include/buildfile +++ /dev/null @@ -1,51 +0,0 @@ -# file : common/include/buildfile -# license : GNU GPL v2; see accompanying LICENSE file - -import libodb = libodb%lib{odb} - -libs = - -for db: $databases - import libs += libodb-$db%lib{odb-$db} - -import libs += lib{common} - -hs = obj1 obj2 obj3 test1 test2 test3 test4 - -exe{driver}: {hxx cxx}{* -*-odb -*-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 - -for h: $hs -{ - exe{driver}: {hxx ixx cxx}{$h-odb} - - <{hxx ixx cxx}{$h-odb}>: hxx{$h} libue{test-meta} - - for db: $databases - { - exe{driver}: {hxx ixx cxx}{$h-odb-$db}: include = $multi - <{hxx ixx cxx}{$h-odb-$db}>: hxx{$h} 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). Also see driver.cxx for the details on -# the -I options usage. -# -odb_options = --table-prefix include_ \ - "-I$out_base" \ - "-I$src_base/.." \ - "-I$src_base/../.." - -cxx.poptions =+ "-I$out_base" "-I$src_base" \ - "-I$out_base/../.." "-I$src_base/../.." - -# Testscript's run-time prerequisites. -# -exe{driver}: ../../alias{database-client}: include = adhoc diff --git a/common/include/driver.cxx b/common/include/driver.cxx deleted file mode 100644 index 561746a..0000000 --- a/common/include/driver.cxx +++ /dev/null @@ -1,42 +0,0 @@ -// file : common/include/driver.cxx -// license : GNU GPL v2; see accompanying LICENSE file - -// Test inclusion of -odb files (compilation test). -// -// The setup of this test is as follows: the ODB compiler has two -// additional include directories in its search path: .. and ../.. -// while the C++ compiler has only ../.. . This way, if a ..-based -// path is used in the generated code, the C++ compilation will -// fail. -// - -#include <memory> -#include <iostream> - -#include <odb/exceptions.hxx> -#include <odb/transaction.hxx> - -#include <libcommon/common.hxx> - -#include "test1.hxx" -#include "test1-odb.hxx" - -#include "test2.hxx" -#include "test2-odb.hxx" - -#include "test3.hxx" -#include "test3-odb.hxx" - -#include "test4.hxx" -#include "test4-odb.hxx" - -#undef NDEBUG -#include <cassert> - -using namespace std; -using namespace odb::core; - -int -main () -{ -} diff --git a/common/include/obj1.hxx b/common/include/obj1.hxx deleted file mode 100644 index 33ae0d6..0000000 --- a/common/include/obj1.hxx +++ /dev/null @@ -1,25 +0,0 @@ -// file : common/include/obj1.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef OBJ1_HXX -#define OBJ1_HXX - -#include <odb/core.hxx> - -#pragma db object -struct object1 -{ - object1 (unsigned long id) - : id_ (id) - { - } - - object1 () - { - } - - #pragma db id - unsigned long id_; -}; - -#endif // OBJ1_HXX diff --git a/common/include/obj2.hxx b/common/include/obj2.hxx deleted file mode 100644 index 2f20f58..0000000 --- a/common/include/obj2.hxx +++ /dev/null @@ -1,25 +0,0 @@ -// file : common/include/obj2.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef OBJ2_HXX -#define OBJ2_HXX - -#include <odb/core.hxx> - -#pragma db object -struct object2 -{ - object2 (unsigned long id) - : id_ (id) - { - } - - object2 () - { - } - - #pragma db id - unsigned long id_; -}; - -#endif // OBJ2_HXX diff --git a/common/include/obj3.hxx b/common/include/obj3.hxx deleted file mode 100644 index 432145b..0000000 --- a/common/include/obj3.hxx +++ /dev/null @@ -1,25 +0,0 @@ -// file : common/include/obj3.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef OBJ3_HXX -#define OBJ3_HXX - -#include <odb/core.hxx> - -#pragma db object -struct object3 -{ - object3 (unsigned long id) - : id_ (id) - { - } - - object3 () - { - } - - #pragma db id - unsigned long id_; -}; - -#endif // OBJ3_HXX diff --git a/common/include/objs1.hxx b/common/include/objs1.hxx deleted file mode 100644 index 6e949e2..0000000 --- a/common/include/objs1.hxx +++ /dev/null @@ -1,13 +0,0 @@ -// file : common/include/objs1.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef OBJS1_HXX -#define OBJS1_HXX - -#ifdef ODB_COMPILER -# include <include/obj1.hxx> -# include <include/obj2.hxx> -# include <include/obj3.hxx> -#endif - -#endif // OBJS1_HXX diff --git a/common/include/objs2.hxx b/common/include/objs2.hxx deleted file mode 100644 index 4f8133b..0000000 --- a/common/include/objs2.hxx +++ /dev/null @@ -1,13 +0,0 @@ -// file : common/include/objs2.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef OBJS2_HXX -#define OBJS2_HXX - -#ifdef ODB_COMPILER -# include "include/obj1.hxx" -# include "include/obj2.hxx" -# include "include/obj3.hxx" -#endif - -#endif // OBJS2_HXX diff --git a/common/include/objs3.hxx b/common/include/objs3.hxx deleted file mode 100644 index 2f7aaff..0000000 --- a/common/include/objs3.hxx +++ /dev/null @@ -1,11 +0,0 @@ -// file : common/include/objs3.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef OBJS3_HXX -#define OBJS3_HXX - -#include "../include/obj1.hxx" -#include "../include/obj2.hxx" -#include "../include/obj3.hxx" - -#endif // OBJS3_HXX diff --git a/common/include/objs4.hxx b/common/include/objs4.hxx deleted file mode 100644 index d766fe6..0000000 --- a/common/include/objs4.hxx +++ /dev/null @@ -1,11 +0,0 @@ -// file : common/include/objs1.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef OBJS4_HXX -#define OBJS4_HXX - -#include <common/include/obj1.hxx> -#include <common/include/obj2.hxx> -#include <common/include/obj3.hxx> - -#endif // OBJS4_HXX diff --git a/common/include/test1.hxx b/common/include/test1.hxx deleted file mode 100644 index 1914ddb..0000000 --- a/common/include/test1.hxx +++ /dev/null @@ -1,16 +0,0 @@ -// file : common/include/test1.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef TEST1_HXX -#define TEST1_HXX - -// Test include directive parsing. -// -#include"obj1.hxx" - - # include \ - <common/include/obj2.hxx> - -/*comment*/ # /*comment*/ include /* comment */ "obj3.hxx" // comment - -#endif // TEST1_HXX diff --git a/common/include/test2.hxx b/common/include/test2.hxx deleted file mode 100644 index 6017ac4..0000000 --- a/common/include/test2.hxx +++ /dev/null @@ -1,15 +0,0 @@ -// file : common/include/test2.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef TEST2_HXX -#define TEST2_HXX - -// Test preference of includes from the main file. -// -#include "objs1.hxx" - -#include "obj1.hxx" -#include "obj2.hxx" -#include "obj3.hxx" - -#endif // TEST2_HXX diff --git a/common/include/test3.hxx b/common/include/test3.hxx deleted file mode 100644 index e55ecdb..0000000 --- a/common/include/test3.hxx +++ /dev/null @@ -1,12 +0,0 @@ -// file : common/include/test3.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef TEST3_HXX -#define TEST3_HXX - -// Test preference of longer (more qualified) paths. -// -#include "objs2.hxx" -#include "objs3.hxx" - -#endif // TEST3_HXX diff --git a/common/include/test4.hxx b/common/include/test4.hxx deleted file mode 100644 index b58e679..0000000 --- a/common/include/test4.hxx +++ /dev/null @@ -1,12 +0,0 @@ -// file : common/include/test3.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef TEST3_HXX -#define TEST3_HXX - -// Test preference of <> over "". -// -#include "objs2.hxx" -#include "objs4.hxx" - -#endif // TEST3_HXX diff --git a/common/include/testscript b/common/include/testscript deleted file mode 100644 index 089f7a1..0000000 --- a/common/include/testscript +++ /dev/null @@ -1,31 +0,0 @@ -# file : common/include/testscript -# license : GNU GPL v2; see accompanying LICENSE file - -.include ../../database-options.testscript - -: mysql -: -if $mysql -{ - .include ../../mysql.testscript - - $* -} - -: sqlite -: -if $sqlite -{ - .include ../../sqlite.testscript - - $* &!odb-test.db -} - -: pgsql -: -if $pgsql -{ - .include ../../pgsql.testscript - - $* -} |