Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 11A51C54E49 for ; Mon, 26 Feb 2024 09:23:52 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.685381.1065972 (Exim 4.92) (envelope-from ) id 1reXD1-00046Z-2i; Mon, 26 Feb 2024 09:23:39 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 685381.1065972; Mon, 26 Feb 2024 09:23:39 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1reXD1-00046S-07; Mon, 26 Feb 2024 09:23:39 +0000 Received: by outflank-mailman (input) for mailman id 685381; Mon, 26 Feb 2024 09:23:38 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1reXD0-000468-Hg for xen-devel@lists.xenproject.org; Mon, 26 Feb 2024 09:23:38 +0000 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [2a00:1450:4864:20::629]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id b7de75b3-d488-11ee-98f5-efadbce2ee36; Mon, 26 Feb 2024 10:23:36 +0100 (CET) Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a4348aaa705so86503266b.0 for ; Mon, 26 Feb 2024 01:23:36 -0800 (PST) Received: from [10.156.60.236] (ip-037-024-206-209.um08.pools.vodafone-ip.de. [37.24.206.209]) by smtp.gmail.com with ESMTPSA id vo1-20020a170907a80100b00a42ea946917sm2213752ejc.130.2024.02.26.01.23.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Feb 2024 01:23:35 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: b7de75b3-d488-11ee-98f5-efadbce2ee36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1708939415; x=1709544215; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=/XhYtCShDR93lDUGaWIA4sRv0Pa4Hm9U6nYsk/8VuPY=; b=GXNpM/h17BwPImWIcMM71tZwhZPhmP0Ur6wmd5XFPykOYgTG0qWiEj/lux8FFEJ6rC jVGhvVxdr5i1MXwfUfHSweNYRkw9mnmaEWEsyaznAQatHN3e4mGCj1dW/y5rbYvTcKs1 GjZo6x2fmbihQNw8CQ4aR9v9+dJaTZOfu/njFXyuy0Xop5rPDKbPAnigEtdqMUDQ/4+T hz3kY7cwQJ1Mgx60iBoN5l/hdoxGpNlge+KS2gG+nNo7nKOux+/udGsheMvZlIBsifKB moAWUEi+PiqIWHveRL6eqj6ut/0eSWROkfWeFqOcwltjW96koahXAzITFiPGas+mSzj0 Kz2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708939416; x=1709544216; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/XhYtCShDR93lDUGaWIA4sRv0Pa4Hm9U6nYsk/8VuPY=; b=OEvC8dp6q7j2nbhHpSNbpFShI4TEsggN6SsZL91GBWMaifAxpUSooBw7TZDoAC+mUM CFunh/N/F5LQvd8iuf8epc4SzmExXO24cq5F+F5meoQ/ZD0he51zPwFOrFL5uiJYEV/8 kTj2mR7bhtm5k7M/EjRMzm3haG2RvD0edaExW384bFXuymT0PEudFFDlbInUX/Tc+mMR 9GHR5t5lDHJ2cUsBl5kWOhOZZQJzXHOGML02XDZQeZ5zjW01A4KASUE0NWoSsTnJqaga mXiQblPCqjGIHSKclAgHwD1eMEGSSavwjFW9N/ULN+NlYmHt3ViviWP4NahoZJ7w51RQ FatA== X-Forwarded-Encrypted: i=1; AJvYcCVtkZOg1e5vmZL9oSYZnQRSSr5XwNNo0vMXQLONd6ZoWsQRQA67uV6lRIdIkNoaXjxPyIjj0njlBo4X9FuseuZchOf0rqvoagblrixXSts= X-Gm-Message-State: AOJu0YzCWTA/VYq52Xu0wMLAmZ5g6hHKuDHXE5rFEIssFLgYvG56/4Ov D835ZG0muH7sqgAV4R9xjVYPQRWwLrIuLj1C/ddricHfuw71UD3P6GqkEXcyJQ== X-Google-Smtp-Source: AGHT+IG1nahSdqZFD9/93euE3j9WPovmK3TPqq49DdnB3QeZtnSQRsuNgc82YteRoZznguXWzlqmJw== X-Received: by 2002:a17:906:254b:b0:a3f:f73:411f with SMTP id j11-20020a170906254b00b00a3f0f73411fmr4066862ejb.45.1708939415701; Mon, 26 Feb 2024 01:23:35 -0800 (PST) Message-ID: Date: Mon, 26 Feb 2024 10:23:37 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [XEN PATCH] automation: Rework "build-each-commit-gcc" test Content-Language: en-US To: Anthony PERARD Cc: Doug Goldstein , Stefano Stabellini , xen-devel@lists.xenproject.org References: <20240220140733.40980-1-anthony.perard@citrix.com> From: Jan Beulich Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP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Ms7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: <20240220140733.40980-1-anthony.perard@citrix.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 20.02.2024 15:07, Anthony PERARD wrote: > Current issues with this test are: > - when the job timeout, the log file is lost as there is no chance to > run the `mv` command. > - GitLab job log is limited in size, so one usually have to download > the artifacts, which may be missing. > > Use $GITLAB_CI to detect when the script is run as part of a GitLab > pipeline. GitLab will add "GITLAB_CI=true" in the environment > variables. > > When run as part of $GITLAB_CI, ignore "dirty" worktree to allow to > write "build-each-commit-gcc.log", which can then be grabbed as > artifacts, even when the job timeout. The `git clean` command is > changed to keep those build logs. > > When run as part of $GITLAB_CI, we will also store the build output in > a log file instead of writing it to stdout, because GitLab's job log > is limited. But we will write the log to stdout in case of error, so > we can find out more quickly why there's been an error. > > This patch also make use of a GitLab feature, "log sections", which we > will collapse by default. One section per commit been built. > > There's a bit of colour added to the logs. > > Signed-off-by: Anthony PERARD I was trying to commit this, but ... > --- a/automation/scripts/build-test.sh > +++ b/automation/scripts/build-test.sh > @@ -9,6 +9,37 @@ > # Set NON_SYMBOLIC_REF=1 if you want to use this script in detached HEAD state. > # This is currently used by automated test system. > > +# Colors with ANSI escape sequences > +txt_info='' > +txt_err='' > +txt_clr='' > + > +# $GITLAB_CI should be "true" or "false". > +if [ "$GITLAB_CI" != true ]; then > + GITLAB_CI=false > +fi > + > +gitlab_log_section() { > + if $GITLAB_CI; then > + echo -n "section_$1:$(date +%s):$2 > " ... there was either corruption on transmit here, or there's an embedded newline that I don't know how to deal with. Jan