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 29B9D26A4E for ; Mon, 6 Aug 2018 13:18:15 -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 B9EWlQkFeYOo for ; Mon, 6 Aug 2018 13:18:15 -0400 (EDT) Received: from smtp32.i.mail.ru (smtp32.i.mail.ru [94.100.177.92]) (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 D7E51269DE for ; Mon, 6 Aug 2018 13:18:14 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH 4/4] Introduce storage reload evolution References: <1e067dd68d69270ccf5aea2ab73548ebd9a0f2ad.1532940401.git.avkhatskevich@tarantool.org> <3d8a81f7-33a6-bf1d-809f-ae5b95730a64@tarantool.org> <83a958f1-e47c-cf5c-7996-3983b7a28b9f@tarantool.org> <264b6bab-ba8a-2bd4-f730-fe83ad52279b@tarantool.org> <05442d0e-1e82-4b41-1837-dc034b19dd60@tarantool.org> <1bb38219-8713-6f43-fd64-1bda264e0345@tarantool.org> <17f76855-00ca-6db5-bc0d-bb6bcc1d9c7d@tarantool.org> From: Vladislav Shpilevoy Message-ID: Date: Mon, 6 Aug 2018 20:18:12 +0300 MIME-Version: 1.0 In-Reply-To: <17f76855-00ca-6db5-bc0d-bb6bcc1d9c7d@tarantool.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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: Alex Khatskevich , tarantool-patches@freelists.org Thanks for the fixes! See 1 comment below. > diff --git a/test/reload_evolution/storage.result b/test/reload_evolution/storage.result > new file mode 100644 > index 0000000..6f3857d > --- /dev/null > +++ b/test/reload_evolution/storage.result > @@ -0,0 +1,245 @@ > +test_run = require('test_run').new() > +--- > +... > +git_util = require('lua_libs.git_util') > +--- > +... > +util = require('lua_libs.util') > +--- > +... > +vshard_copy_path = util.BUILDDIR .. '/test/var/vshard_git_tree_copy' > +--- > +... > +evolution_log = git_util.log_hashes({args='vshard/storage/reload_evolution.lua', dir=util.SOURCEDIR}) > +--- > +... > +-- Cleanup the directory after a previous build. > +_ = os.execute('rm -rf ' .. vshard_copy_path) > +--- > +... > +-- 1. `git worktree` cannot be used because PACKPACK mounts > +-- `/source/` in `ro` mode. > +-- 2. Just `cp -rf` cannot be used due to a little different > +-- behavior in Centos 7. > +_ = os.execute('mkdir ' .. vshard_copy_path) > +--- > +... > +_ = os.execute("cd " .. util.SOURCEDIR .. " && cp -rf ./.git " .. vshard_copy_path) > +--- > +... > +-- Checkout the first commit with a reload_evolution mechanism. > +git_util.exec('checkout', {args='-f', dir=vshard_copy_path}) > +--- > +... > +git_util.exec('checkout', {args=evolution_log[#evolution_log] .. '~1', dir=vshard_copy_path}) 1. Why do you need 2 checkouts in a row? I have removed it and nothing was changed.