From: Alexander Turenko <alexander.turenko@tarantool.org> To: sergeyb@tarantool.org Cc: tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH v3 2/2] Add option to update file with reference output Date: Tue, 9 Jun 2020 17:36:44 +0300 [thread overview] Message-ID: <20200609143644.tyeh277rb5cwmv5t@tkn_work_nb> (raw) In-Reply-To: <37fb3b360327ef0f93d5074153adda9e61eda697.1591629414.git.sergeyb@tarantool.org> Made several changes, see below. Pushed the patchset to test-run's master. Updated the submodule in tarantool and pushed the update to master, 2.4, 2.3 and 1.10 branches. WBR, Alexander Turenko. > - elif (self.is_executed_ok and not > - self.is_equal_result and not > - os.path.isfile(self.result)) and not is_tap: > + elif (self.is_executed_ok and > + not self.is_equal_result and > + not os.path.isfile(self.result) and not is_tap): > shutil.copy(self.tmp_result, self.result) > short_status = 'new' > color_stdout("[ new ]\n", schema='test_new') We should write new result files only under --update-result. Added the check for the option: | os.remove(self.tmp_result) | elif (self.is_executed_ok and | not self.is_equal_result and | - not os.path.isfile(self.result) and not is_tap): | + not os.path.isfile(self.result) and | + not is_tap and | + lib.Options().args.update_result): | shutil.copy(self.tmp_result, self.result) | short_status = 'new' | color_stdout("[ new ]\n", schema='test_new') > + elif (self.is_executed_ok and > + not self.is_equal_result and > + lib.Options().args.update_result): > + shutil.copy(self.tmp_result, self.result) > + short_status = 'updated' > + color_stdout("[ updated ]\n", schema='test_new') It will write a new result file for a failed TAP13 test under the option. I guess it is not the expected behaviour in most of cases. Say, I changed something in the net.box implementation and want to update result files for all related tests in a batch (`./test-run.py --update-result net.box`), but it should not write a result file (and report successful testing) if some TAP13 test fails. Added the check: | color_stdout("[ new ]\n", schema='test_new') | elif (self.is_executed_ok and | not self.is_equal_result and | + os.path.isfile(self.result) and | + not is_tap and | lib.Options().args.update_result): | shutil.copy(self.tmp_result, self.result) | short_status = 'updated'
next prev parent reply other threads:[~2020-06-09 14:36 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-06-08 15:25 [Tarantool-patches] [PATCH v3 0/2] " sergeyb 2020-06-08 15:25 ` [Tarantool-patches] [PATCH v3 1/2] Add flake8 config file to increase line minimal length sergeyb 2020-06-08 15:25 ` [Tarantool-patches] [PATCH v3 2/2] Add option to update file with reference output sergeyb 2020-06-09 14:36 ` Alexander Turenko [this message] 2020-06-09 16:00 ` Sergey Bronnikov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200609143644.tyeh277rb5cwmv5t@tkn_work_nb \ --to=alexander.turenko@tarantool.org \ --cc=sergeyb@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH v3 2/2] Add option to update file with reference output' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox