From nobody Sun Feb 8 23:06:10 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1695114998; cv=none; d=zohomail.com; s=zohoarc; b=D8z5nLa+vcyuvwMl/32vjtOaykLyPzGk1mPSw/DGkgIXEIBASncpWPb2YYvNC0i6o8FkAUK++FGECVdb2cyopOYEuPvww+jNDHXi1fIMDL84yM/+iyIdiH2XZokTzsnC5ma69Wo/IIhkos2FxXRi5sJLVJR76TIHjhte0FBbooA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1695114998; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=us+RiNLsdkBz5mz8/3P4xxdcA1dsvdtYXE88j4K1g1c=; b=ZQkxWzADrdf2iiIhMkOv1Ufcgtp0uTK+pm6QHs4ft1qr5SMbhm8PiZY1sSe7ZLUjAReOJPm1VTYQEj+Bc2gFo8Jb9S1XgNSi2RZEkRWW697Zn6mpHNquGmoKZMvd+33oSqMmpWhphnLkiZ0ZxncgtFgHOE81EBT7swCjn3+Lh2s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1695114998295116.76315802677584; Tue, 19 Sep 2023 02:16:38 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-626-rBFsPpS1OmaCMzuPRPouIg-1; Tue, 19 Sep 2023 05:16:34 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 85A528039C8; Tue, 19 Sep 2023 09:16:32 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 70891167F8; Tue, 19 Sep 2023 09:16:32 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 93D9E19452CD; Tue, 19 Sep 2023 09:15:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 966D3194658C for ; Tue, 19 Sep 2023 09:15:18 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 91B022156711; Tue, 19 Sep 2023 09:15:18 +0000 (UTC) Received: from orca.brq.redhat.com (unknown [10.43.2.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id 016282156701; Tue, 19 Sep 2023 09:15:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695114997; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=us+RiNLsdkBz5mz8/3P4xxdcA1dsvdtYXE88j4K1g1c=; b=LTipbh4XGcBhD6QOMuOOWWUG75RgcaZOHoZagq9iFSypoCuVHwb8GBR9EE5paZFAMZfkJU X1SlZfdV9czfJZsqDH1qiH5I/JmXd+9Y5oqWDX+Jy9+RUzRTKk+eN1p9Mn9Vu0Gy8X7Ucy V80+K+nIhzlrXHySx5X24mBS9TQ2c+0= X-MC-Unique: rBFsPpS1OmaCMzuPRPouIg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Erik Skultety To: libvir-list@redhat.com Subject: [libvirt PATCH v3 12/12] ci: jobs.sh: Define and create SCRATCH_DIR for local executions Date: Tue, 19 Sep 2023 11:15:07 +0200 Message-ID: <8edaf5c45b1601650ec14dbeaae00b8635d3a65e.1695114836.git.eskultet@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Erik Skultety Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1695114999085100002 Running outside of GitLab will likely not have the variable set and hence the execution would fail. To make sure we always start with a clean scratch dir (which may or may not be the best thing), create it with 'mktemp'. The main reason for a temporary directory is to ensure a clean environment for the job every time run_integration function is run. For repeated interactive use case, it is imperative that the developer takes care of their environment. Signed-off-by: Erik Skultety Reviewed-by: Daniel P. Berrang=C3=A9 --- ci/jobs.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ci/jobs.sh b/ci/jobs.sh index 2e6888232f..ba522258a1 100644 --- a/ci/jobs.sh +++ b/ci/jobs.sh @@ -122,6 +122,13 @@ run_integration() { # should also be a non-fatal error run_cmd_quiet sudo virsh --quiet net-start default || true =20 + # SCRATCH_DIR is normally set inside the GitLab CI job to /tmp/scratch. + # However, for local executions inside a VM we need to make sure some + # scratch directory exists and also that it is created outside of /tmp= for + # storage space reasons (if multiple project repos are to be cloned). + SCRATCH_DIR=3D"${SCRATCH_DIR:=3D$GIT_ROOT/ci/scratch)}" + + test ! -d "$SCRATCH_DIR" && run_cmd mkdir "$SCRATCH_DIR" run_cmd cd "$SCRATCH_DIR" run_cmd git clone --depth 1 https://gitlab.com/libvirt/libvirt-tck.git run_cmd cd libvirt-tck --=20 2.41.0