From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id CAACE46970E for ; Wed, 18 Dec 2019 11:19:16 +0300 (MSK) From: "Alexander V. Tikhonov" Date: Wed, 18 Dec 2019 11:19:14 +0300 Message-Id: <768960930f53ecdb7ca2e233078cbb6d9fd60297.1576656973.git.avtikhon@tarantool.org> Subject: [Tarantool-patches] [PATCH test-run v1] prepare test-run for out of source build List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Turenko Cc: tarantool-patches@dev.tarantool.org Changed the path for saving *.reject files, for now it is saving in the '/' subfolder given in options or set localy as 'var/' by default. --- Github: https://github.com/tarantool/tarantool/tree/avtikhon/out-os-source README.md | 5 +++-- lib/test.py | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index aefeeff..8b58850 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,9 @@ executed. In the local env there's object `self`, that's `Test` object. If test must be skipped - you must put `self.skip = 1` in this file. Next, `.test(.lua|.py)?` is executed and file `.reject` is created, then `.reject` is compared with `.result`. If something differs, then 15 last string of this diff -file are printed and `.reject` file is saving in the folder, where `.result` -file is. If not, then `.reject` is deleted. +file are printed and `.reject` file is saving in the '/' subfolder +given in options or set localy as 'var/' by default. If not, then +`.reject` is deleted. ### Test configuration diff --git a/lib/test.py b/lib/test.py index 3e93af3..362b818 100644 --- a/lib/test.py +++ b/lib/test.py @@ -115,7 +115,8 @@ class Test(object): self.result = os.path.join(suite_ini['suite'], get_result(name)) self.skip_cond = os.path.join(suite_ini['suite'], get_skipcond(name)) self.tmp_result = os.path.join(suite_ini['vardir'], get_result(name)) - self.reject = os.path.join(suite_ini['suite'], get_reject(name)) + self.var_suite_path = os.path.join(suite_ini['vardir'], suite_ini['suite']) + self.reject = os.path.join(self.var_suite_path, get_reject(name)) self.is_executed = False self.is_executed_ok = None self.is_equal_result = None @@ -222,6 +223,9 @@ class Test(object): short_status = None + if not os.path.exists(self.var_suite_path): + os.mkdir(self.var_suite_path) + if self.skip: short_status = 'skip' color_stdout("[ skip ]\n", schema='test_skip') -- 2.17.1