diff --git a/debian/changelog b/debian/changelog index 1acbd0337b96aad15b6c4c0eb4dd196916a04a0d..f17f7602096e5bc1056d52e00987e2cc26d76792 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,19 @@ -tarantool (1.6.3.183.gd309992-1) UNRELEASED; urgency=medium +tarantool (1.6.3.539.g211672f-1) unstable; urgency=medium * Init infrastructure for tarantool 1.6. - - -- Dmitry E. Oboukhov <unera@debian.org> Wed, 20 Aug 2014 17:19:14 +0400 + * Update debian/copyright: + + cmake/luatest.cpp + + third_party/PMurHash.* + + third_party/lua-yaml/* + + third_party/sha1.* + + third_party/open_memstream.* + * Add lintian-oferrides: libyaml: + tarantool has patched version of the library. + * Rename -plugin* package to -module* + * Conflicts: tarantool 1.5 (it was renamed to tarantool-lts). + * NOSTRIP /usr/bin/tarantool binary: it uses symbols runtime. + + -- Dmitry E. Oboukhov <unera@debian.org> Mon, 27 Oct 2014 14:33:07 +0300 tarantool (1.5.3.53.ge2308d8-1) unstable; urgency=medium diff --git a/debian/copyright b/debian/copyright index 59daed1a0d362192f3860a2ffb0fd92f955e84ef..6d01443b320c667ca7740889dba61f5843a2ba0b 100644 --- a/debian/copyright +++ b/debian/copyright @@ -217,7 +217,7 @@ License: BSD-3-Clause (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Files: third_party/luajit/* +Files: third_party/luajit/* cmake/luatest.cpp Copyright: 2005-2011 Mike Pall. All rights reserved. 1994-2011 Lua.org, PUC-Rio. License: MIT @@ -302,6 +302,7 @@ Files: third_party/qsort_arg.c third_party/compat/sys/bsd_time.h third_party/queue.h connector/c/tntsql/include/tnt_queue.h + third_party/rb.h Copyright: 1992, 1993 The Regents of the University of California. License: BSD-3-Clause All rights reserved. @@ -571,6 +572,69 @@ License: BSD-2-Clause THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Files: third_party/PMurHash.* +Copyright: Austin Appleby +License: Public-Domain + MurmurHash3 was written by Austin Appleby, and is placed in the public + domain. + . + This implementation was written by Shane Day, and is also public domain. + . + This is a portable ANSI C implementation of MurmurHash3_x86_32 (Murmur3A) + with support for progressive processing. + +Files: third_party/lua-yaml/* +Copyright: 2009, Andrew Danforth +License: Expat + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +Files: ./third_party/sha1.* +Copyright: Steve Reid <steve@edmweb.com> +License: Public-Domain + Public Domain. + +Files: third_party/open_memstream.* +Copyright: 2013 Advanced Computing Technologies LLC, + Written by: John H. Baldwin <jhb@FreeBSD.org> +License: BSD-2-Clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + . + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + . + THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + Files: * Copyright: 2010-2014 by Aleksey Demakov, Aleksey Mashanov, Alexandre Kalendarev, Damien Lefortier, Dmitry E. Oboukhov, diff --git a/debian/tarantool.lintian-overrides b/debian/tarantool.lintian-overrides index 79de2b236e53ae6dff1c40a7d0a33221e1a1fd18..67d2005c096b6ec202b10db73b9def47293fbf66 100644 --- a/debian/tarantool.lintian-overrides +++ b/debian/tarantool.lintian-overrides @@ -1 +1,2 @@ tarantool: unstripped-binary-or-object usr/bin/tarantool +tarantool: embedded-library usr/bin/tarantool: libyaml diff --git a/src/lua/tap.lua b/src/lua/tap.lua index 34c4f3fe6012135a9ad3072af70e9f6294742d4e..67cb4026cf86ca7f852bda811e4af8bb58f30d44 100644 --- a/src/lua/tap.lua +++ b/src/lua/tap.lua @@ -126,6 +126,20 @@ local function cmpdeeply(got, expected, extra) return true end +local function like(test, got, pattern, message, extra) + extra = extra or {} + extra.got = got + extra.expected = pattern + return ok(test, string.match(tostring(got), pattern) ~= nil, message, extra) +end + +local function unlike(test, got, pattern, message, extra) + extra = extra or {} + extra.got = got + extra.expected = pattern + return ok(test, string.match(tostring(got), pattern) == nil, message, extra) +end + local function is(test, got, expected, message, extra) extra = extra or {} extra.got = got @@ -141,7 +155,7 @@ local function isnt(test, got, unexpected, message, extra) end -local function isdeeply(test, got, expected, message, extra) +local function is_deeply(test, got, expected, message, extra) extra = extra or {} extra.got = got extra.expected = expected @@ -268,7 +282,9 @@ test_mt = { isboolean = isboolean; isudata = isudata; iscdata = iscdata; - isdeeply = isdeeply; + is_deeply = is_deeply; + like = like; + unlike = unlike; } } diff --git a/test/app/lua/serializer_test.lua b/test/app/lua/serializer_test.lua index 22f7b028b2668163aa3aedb1efd4be5474c169f6..3adb18518d913d8112c498d3a6ca19aeaa398d13 100644 --- a/test/app/lua/serializer_test.lua +++ b/test/app/lua/serializer_test.lua @@ -18,7 +18,7 @@ local function rt(test, s, x) else xstr = tostring(x) end - test:isdeeply(x, x1, "encode/decode for "..xstr) + test:is_deeply(x, x1, "encode/decode for "..xstr) end local function test_unsigned(test, s) diff --git a/test/app/msgpack.test.lua b/test/app/msgpack.test.lua index b101b361bff04ee2d2d1f8f7196d8f06cbed3073..8fd8b15d8edbb603ee4fa2e59671a627c5404d7f 100755 --- a/test/app/msgpack.test.lua +++ b/test/app/msgpack.test.lua @@ -25,11 +25,11 @@ local function test_offsets(test, s) local a local offset = 1 a, offset = s.decode(dump, offset) - test:isdeeply(a, arr1, "decoded part1") + test:is_deeply(a, arr1, "decoded part1") test:is(offset, 5, "offset of part2") a, offset = s.decode(dump, offset) - test:isdeeply(a, arr2, "decoded part2") + test:is_deeply(a, arr2, "decoded part2") test:is(offset, 9, "offset of end") test:ok(not pcall(s.decode, dump, offset), "invalid offset") diff --git a/test/app/msgpackffi.test.lua b/test/app/msgpackffi.test.lua index 3a9e2fc76477cd7b1459f4cf494420deb86f889e..a3fdf7504b1041778d2bd06aafd07b6346e5db09 100755 --- a/test/app/msgpackffi.test.lua +++ b/test/app/msgpackffi.test.lua @@ -25,11 +25,11 @@ local function test_offsets(test, s) local a local offset = 1 a, offset = s.decode(dump, offset) - test:isdeeply(a, arr1, "decoded part1") + test:is_deeply(a, arr1, "decoded part1") test:is(offset, 5, "offset of part2") a, offset = s.decode(dump, offset) - test:isdeeply(a, arr2, "decoded part2") + test:is_deeply(a, arr2, "decoded part2") test:is(offset, 9, "offset of end") test:ok(not pcall(s.decode, dump, offset), "invalid offset") diff --git a/test/app/tap.result b/test/app/tap.result index a26757e5bf0de39ea0266d114785af85f9dafc64..3e7882331599fad91d2a2f6d2aefa9efa7a62a43 100644 --- a/test/app/tap.result +++ b/test/app/tap.result @@ -1,5 +1,5 @@ TAP version 13 -1..31 +1..32 ok - true ok - extra information is not printed on success not ok - extra printed using yaml only on failure @@ -118,7 +118,7 @@ not ok - failed subtests planned: 1 failed: 1 ... - # isdeeply + # is_deeply 1..6 ok - 1 and 1 ok - abc and abc @@ -136,10 +136,16 @@ not ok - failed subtests expected: 5 got: 4 ... - # isdeeply: end + # is_deeply: end not ok - failed subtests --- planned: 6 failed: 2 ... + # like + 1..2 + ok - like(abcde, cd) + ok - unlike(abcde, acd) + # like: end +ok - like # failed subtest: 15 diff --git a/test/app/tap.test.lua b/test/app/tap.test.lua index cc2d9bf3828395259b466ecc27e284bfd6cdaa62..a823faaa9ced0977fa00253d76442f1a9ca3a8a6 100755 --- a/test/app/tap.test.lua +++ b/test/app/tap.test.lua @@ -20,7 +20,7 @@ test.trace = false -- ok, fail and skip predicates -- -test:plan(31) -- plan to run 3 test +test:plan(32) -- plan to run 3 test test:ok(true, 'true') -- basic function local extra = { state = 'some userful information to debug on failure', details = 'a table argument formatted using yaml.encode()' } @@ -117,18 +117,25 @@ end) -test:test('isdeeply', function(t) +test:test('is_deeply', function(t) t:plan(6) - t:isdeeply(1, 1, '1 and 1') - t:isdeeply('abc', 'abc', 'abc and abc') - t:isdeeply({}, {}, 'empty tables') - t:isdeeply({1}, {1}, '{1} and {1}') - t:isdeeply({1}, {2}, '{1} and {2}') - t:isdeeply({1, 2, { 3, 4 }}, {1, 2, { 3, 5 }}, '{1,2,{3,4}} and {1,2,{3,5}}') + t:is_deeply(1, 1, '1 and 1') + t:is_deeply('abc', 'abc', 'abc and abc') + t:is_deeply({}, {}, 'empty tables') + t:is_deeply({1}, {1}, '{1} and {1}') + t:is_deeply({1}, {2}, '{1} and {2}') + t:is_deeply({1, 2, { 3, 4 }}, {1, 2, { 3, 5 }}, '{1,2,{3,4}} and {1,2,{3,5}}') end) + +test:test('like', function(t) + t:plan(2) + t:like('abcde', 'cd', 'like(abcde, cd)') + t:unlike('abcde', 'acd', 'unlike(abcde, acd)') +end) + -- -- Finish root test. Since we used non-callback variant, we have to -- call check explicitly.