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 C94D02A85A for ; Sun, 7 Apr 2019 03:08:32 -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 PQS7G_aynASr for ; Sun, 7 Apr 2019 03:08:32 -0400 (EDT) Received: from smtp38.i.mail.ru (smtp38.i.mail.ru [94.100.177.98]) (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 7255F1FADB for ; Sun, 7 Apr 2019 03:08:32 -0400 (EDT) Date: Sun, 7 Apr 2019 10:08:24 +0300 From: Alexander Turenko Subject: [tarantool-patches] Re: [PATCH v1] test: switch on pretest_clean routine Message-ID: <20190407070823.jhtdeoltpe7qeqwj@tkn_work_nb> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: 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: avtikhon Cc: tarantool-patches@freelists.org Removed the flag from python tests and unit tests (it does not do anything in these cases, see the description in test-run/README.md). There was review [1] and it seems some comments are still actual. However I tried to implement that myself and was dissatisfied with the result, because of the following reasons: - much code of tests moves around w/o visible reasons; - this way disallows usage of functions from an instance file in tests w/o, again, visible reasons; it obligates a developer to have a separate file for helper functions to reuse them across tests or copy them to each test (and they will reside in result files also). So I decided to implement user-provided list of protected globals [2] and use it here. Described how the option works in the commit message and mentioned that the issue has an example of a problem that is beat with this option. Pushed to master and 2.1. [1]: https://www.freelists.org/post/tarantool-patches/test-switched-on-pretest-clean-routine,1 [2]: https://github.com/tarantool/test-run/pull/153 WBR, Alexander Turenko. On Thu, Apr 04, 2019 at 09:11:01AM +0300, avtikhon wrote: > Flag 'pretest_clean = True' at the suite.ini file switches on > pretest_clean routine at the 'test-run' which helps to cleanup > the test environment before test start. This 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. Also it removes the global functions in box suite > before each test, that is why they were moved at the test_helpers > module. > --- > > Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-3863-pretest-clean > Issue: https://github.com/tarantool/tarantool/issues/4094