From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 7657C2AF52 for ; Tue, 2 Apr 2019 21:58:20 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id v9d4G95KwRWq for ; Tue, 2 Apr 2019 21:58:20 -0400 (EDT) Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id CB21F2AF51 for ; Tue, 2 Apr 2019 21:58:19 -0400 (EDT) From: Alexander Turenko Subject: [tarantool-patches] [PATCH] test: use pretest_clean on sql-tap test suite Date: Wed, 3 Apr 2019 04:58:10 +0300 Message-Id: <96cdc5ba8fcb20fcbe51c850c4c541d855594d7d.1554251743.git.alexander.turenko@tarantool.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: tarantool-patches@freelists.org Cc: Alexander Turenko , Nikita Pettik A problem appears when tests are run in the following order on one test-run worker: - sql-tap/select6.test.lua - sql-tap/gh-4077-iproto-execute-no-bind.test.lua The latter one fails with the following error: > Space 'T' already exists This test does not perform require('sqltester'), where *.{xlog,snap} files from a previous test are removed, and so the test can observe a non-clean state of a database. Now test-run has pretest_clean option that do exactly what sqltester had been doing: when the option enabled test-run removes *.{xlog,snap} files before run a 'core = app' test. The only difference that now these files will be removed for every test in sql-tap test suite, not only for ones that use sqltester. Follows up #4077. --- https://github.com/tarantool/tarantool/issues/4077 https://github.com/tarantool/tarantool/tree/Totktonada/use-pretest-clean-on-sql-tap-test-suite test/sql-tap/lua/sqltester.lua | 6 ------ test/sql-tap/suite.ini | 1 + 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/test/sql-tap/lua/sqltester.lua b/test/sql-tap/lua/sqltester.lua index 4450f5a0a..87ddca718 100644 --- a/test/sql-tap/lua/sqltester.lua +++ b/test/sql-tap/lua/sqltester.lua @@ -426,12 +426,6 @@ end setmetatable(_G, nil) --- perform clean up only under test-run -if test_run then - os.execute("rm -rf $(ls -d */)") - os.execute("rm -f *.snap *.xlog* *.vylog* *.run*") -end - -- start the database box.cfg{ memtx_max_tuple_size=4996109; diff --git a/test/sql-tap/suite.ini b/test/sql-tap/suite.ini index e3e483851..3b1dcce6a 100644 --- a/test/sql-tap/suite.ini +++ b/test/sql-tap/suite.ini @@ -28,3 +28,4 @@ release_disabled = debug_mode_only.test.lua long_run = gh-3332-tuple-format-leak.test.lua, gh-3083-ephemeral-unref-tuples.test.lua config = engine.cfg show_reproduce_content = False +pretest_clean = True -- 2.20.1