From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 dev.tarantool.org (Postfix) with ESMTPS id 4C040469719 for ; Wed, 23 Sep 2020 09:45:57 +0300 (MSK) Date: Wed, 23 Sep 2020 09:45:55 +0300 From: "Alexander V. Tikhonov" Message-ID: <20200923064555.GA17859@hpalx> References: <20200921021813.t7pfdtlpupv6fnbk@tkn_work_nb> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200921021813.t7pfdtlpupv6fnbk@tkn_work_nb> Subject: Re: [Tarantool-patches] [PATCH v2 1/2] gitlab-ci: save failed test results files List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Turenko Cc: tarantool-patches@dev.tarantool.org Hi Alexander, thanks for the review. I've removed collecting of results files *.reject, which duplicates *.result files in artifactory path. And set 'artifactory' path as root in saved artifacts packages. On Mon, Sep 21, 2020 at 05:18:13AM +0300, Alexander Turenko wrote: > > + <<: *artifacts_reject_files_definition > > + > > +.pack_artifacts_reject_files_template: &pack_artifacts_reject_files_definition > > + <<: *artifacts_reject_files_definition > > + after_script: > > + - > > > + for f in `ls build/usr/src/*/tarantool-*/test/*/*.reject` ; do > > Nit: 'for f in path-with-star-globbing; do' would do almost the same and > I would suggest to use the simpler form (it also does not depend on an > external tool and does not involve forking), but this way we should > handle 'no such files' case explicitly. See example here: > > https://github.com/tarantool/tarantool/commit/080beba063b05b184d7befcb15a8bcf32e7424f6 > > | for file in @TARANTOOL_ENABLEDDIR@/*.lua; do > | instance=`basename $file .lua` > | [ "${instance}" = "*" ] && break # skip empty directory > | <...> > | done > > When the glob is not matched, it falls into the loop with the 'as is' > value (with star symbols). > > We all like bourne shell for those funny pitfalls. > > > + d=`dirname $f | sed 's#^build/usr/src/.*/tarantool-.*/test/##g'` ; > > + mkdir -p test/$d 2>/dev/null ; > > + cp $f test/$d/. ; > > + done ; > > + rm -rf test/var ; mkdir -p test/var ; > > + cp -r build/usr/src/*/tarantool-*/test/var/artifacts test/var/. > > Nit: The period at the end looks unusual, but don't change anything. > > The patch would be a way simpler if test-run would collect everything > that is necessary to upload within the artifacts directory. > > In fact, reject files are already there: > test/var/artifacts//.result. But if you want to > organize them in an another way, I would do this on the test-run side > (somewhere within test/var/artifacts). > > Related code: [1]. See, the reject file is just copied, not moved. > > [1]: https://github.com/tarantool/test-run/blob/461731d71cf27faa6295bc759941f402fedc88e4/lib/test.py#L254