diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2023-12-13 21:57:53 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2024-01-23 21:20:44 +0300 |
commit | fc3fb39c90ab7fe5fccbe3f3bc0eb2645157bb96 (patch) | |
tree | 6c8c1bfb5fe89f7378b92ac066b4ca8ecfd25228 /common/changelog/testscript | |
parent | 02367faedb16b6186e8852de47e5b749dc48c2df (diff) |
Switch to build2
Diffstat (limited to 'common/changelog/testscript')
-rw-r--r-- | common/changelog/testscript | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/common/changelog/testscript b/common/changelog/testscript new file mode 100644 index 0000000..9368938 --- /dev/null +++ b/common/changelog/testscript @@ -0,0 +1,66 @@ +# file : common/changelog/testscript +# license : GNU GPL v2; see accompanying LICENSE file + +headers = [paths] $path_search($src_base/*.hxx) + +odb_options = --generate-schema-only \ + --schema-format sql \ + --suppress-migration \ + --options-file $out_base/odb.options + +: mysql +: +if $mysql +{ + odb_options += --database 'mysql' --changelog-dir $~ + + for h: $headers + n = $base($leaf($h)) + + $* $odb_options -DBVER=1 -DCVER=1 --init-changelog $h &$(n).xml &$(n).sql + + $* $odb_options -DBVER=1 -DCVER=2 $h + diff $src_base/$n-mysql-diff.xml $(n).xml + + $* $odb_options -DBVER=2 -DCVER=3 $h + diff $src_base/$n-mysql-patch.xml $(n).xml + end +} + +: sqlite +: +if $sqlite +{ + odb_options += --database 'sqlite' --changelog-dir $~ + + for h: $headers + n = $base($leaf($h)) + + $* $odb_options -DBVER=1 -DCVER=1 --init-changelog $h &$(n).xml &$(n).sql + + $* $odb_options -DBVER=1 -DCVER=2 $h + diff $src_base/$n-sqlite-diff.xml $(n).xml + + $* $odb_options -DBVER=2 -DCVER=3 $h + diff $src_base/$n-sqlite-patch.xml $(n).xml + end +} + +: pgsql +: +if $pgsql +{ + odb_options += --database 'pgsql' --changelog-dir $~ + + for h: $headers + n = $base($leaf($h)) + + $* $odb_options -DBVER=1 -DCVER=1 --init-changelog $h &$(n).xml &$(n).sql + + $* $odb_options -DBVER=1 -DCVER=2 $h + diff $src_base/$n-pgsql-diff.xml $(n).xml + + $* $odb_options -DBVER=2 -DCVER=3 $h + diff $src_base/$n-pgsql-patch.xml $(n).xml + end +} |