From patchwork Mon Apr 8 03:22:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Martincoski X-Patchwork-Id: 1080555 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="k81ki7Lb"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44cwkv1QSRz9sNx for ; Mon, 8 Apr 2019 13:24:23 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 6D2E82270C; Mon, 8 Apr 2019 03:24:21 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id f3DUkTHrb-XW; Mon, 8 Apr 2019 03:24:18 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id BC8972281E; Mon, 8 Apr 2019 03:24:18 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 555241BF2F2 for ; Mon, 8 Apr 2019 03:23:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 8AC7E2281E for ; Mon, 8 Apr 2019 03:23:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HBABcw1KP9MY for ; Mon, 8 Apr 2019 03:23:36 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qt1-f169.google.com (mail-qt1-f169.google.com [209.85.160.169]) by silver.osuosl.org (Postfix) with ESMTPS id 719412270C for ; Mon, 8 Apr 2019 03:23:35 +0000 (UTC) Received: by mail-qt1-f169.google.com with SMTP id h39so5007598qte.2 for ; Sun, 07 Apr 2019 20:23:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=5PT8NsGpOKIiOIrzGgbEZIje8gcxcobKsbEO1/p5YKI=; b=k81ki7Lbw0FCmbOOc/+XnCt85tIE1Tltl1pLyVc8t5x8BUzrssXh0hW0cXiJxEASFU vRbg9ktedOs3hM3EiQBzv2INs61vlSX0JtHb4HNY0PfkQeINnjwBQhDyYVdFH59wnoxy TOwFH1jBx4Obj5riEwBRAL1AA5c7ZcahdUFAuX8qPWcE34HCBTVuYFftAYq712EKAZ+J ASrhdV3wGpEM6C+mzFI5Q3MdMMepUJxlgu2vqAHjsLzO5GAqwkFqPJ/u0GKP2feOSfe0 hNMlnMJeAzsHQJRaEZ2VeJdGnRN3uQLsqeXhf47qj2AsWIv7TkDZDJp17ZV5XyWAA0b6 V3gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=5PT8NsGpOKIiOIrzGgbEZIje8gcxcobKsbEO1/p5YKI=; b=CDR0q/zIKekMeq5LUk+bs+HS1o2Cya4XcYVq5Z8qcP3bqPdhVRFiMVA9rRiHJN3lNl 2yZHVeaR6J3FhcQf6AJvbv0NoowH0e0pr4DEr355IkrZUwhSzYCMscJTSiWHlyf+f5hZ Wg5lXviaXeqf0a1vgq8alJsJTUDAwFB6dffWMvDJ5rNTSHe5vSO7C4mcePvlYgCH4PDX TxUZEKzRglYYpOIrr4lF0ey0QTsxTVgoklS0+QSC4tI1K7zoYwEJGaZBRzs8BUD7iZhQ 7yqiXoe/yq1lz5KEvZ5VtafIJWUfV7URWD/HPnos+BQNo264uI5rROoMILtkti/9UwAS 1teQ== X-Gm-Message-State: APjAAAUbrbo+xetHZYI4CVtwwDYmctczQiAvJ3EEp/KM3bsft1K9HcKQ rEJxMmb5LDQY39N6TACYpUDe4L85 X-Google-Smtp-Source: APXvYqyqU+WFuj12TeG2+y3bG6M3kxXoVW86gAWaGEXjRzFdBJ1za6I35YRRaKFFmu2ViFMe8hysJw== X-Received: by 2002:aed:3562:: with SMTP id b31mr22504730qte.154.1554693814446; Sun, 07 Apr 2019 20:23:34 -0700 (PDT) Received: from ultri5.home ([177.97.114.221]) by smtp.gmail.com with ESMTPSA id l59sm17160719qte.6.2019.04.07.20.23.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 07 Apr 2019 20:23:34 -0700 (PDT) From: Ricardo Martincoski To: buildroot@buildroot.org Date: Mon, 8 Apr 2019 00:22:54 -0300 Message-Id: <20190408032255.12841-3-ricardo.martincoski@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190408032255.12841-1-ricardo.martincoski@gmail.com> References: <20190408032255.12841-1-ricardo.martincoski@gmail.com> In-Reply-To: <20190121011115.19255-1-ricardo.martincoski@gmail.com> References: <20190121011115.19255-1-ricardo.martincoski@gmail.com> Subject: [Buildroot] [PATCH v4 2/3] .gitlab-ci.yml: prepare to reuse scripts X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , Ricardo Martincoski MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Use local variables to pass the name of the defconfig to build or runtime test to run. This change allows upcoming new jobs to reuse those scripts. Signed-off-by: Ricardo Martincoski Cc: Arnout Vandecappelle Cc: Thomas Petazzoni --- Changes v3 -> v4: - rebase after removing one patch from the series; Changes v2 -> v3: - new patch, trying to make the review/testing easier; For test purposes I created a commit that makes all defconfigs and runtime tests to echo the command that would be called instead of actually calling it and then I asked Gitlab CI to run: - only the check-* jobs: https://gitlab.com/RicardoMartincoski/buildroot/pipelines/55632102 - all defconfigs and all check-* jobs: https://gitlab.com/RicardoMartincoski/buildroot/pipelines/55632126 - all runtime tests and all check-* jobs: https://gitlab.com/RicardoMartincoski/buildroot/pipelines/55632153 - all jobs (using a tag): https://gitlab.com/RicardoMartincoski/buildroot/pipelines/55632193 --- .gitlab-ci.yml | 23 ++++++++++++++++------- .gitlab-ci.yml.in | 23 ++++++++++++++++------- 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 58166364ad..44fdb94f65 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -36,8 +36,8 @@ check-package: .defconfig_script: script: - - echo 'Configure Buildroot' - - make ${CI_JOB_NAME} + - echo "Configure Buildroot for ${DEFCONFIG_NAME}" + - make ${DEFCONFIG_NAME} - echo 'Build buildroot' - | make > >(tee build.log |grep '>>>') 2>&1 || { @@ -54,6 +54,8 @@ check-package: - triggers - tags - /-defconfigs$/ + before_script: + - DEFCONFIG_NAME=${CI_JOB_NAME} artifacts: when: always expire_in: 2 weeks @@ -65,18 +67,25 @@ check-package: - output/build/packages-file-list.txt - output/build/*/.config +.runtime_test_script: + # Keep build directories so the rootfs can be an artifact of the job. The + # runner will clean up those files for us. + # Multiply every emulator timeout by 10 to avoid sporadic failures in + # elastic runners. + script: + - echo "Starting runtime test ${TEST_CASE_NAME}" + - ./support/testing/run-tests -o test-output/ -d test-dl/ -k --timeout-multiplier 10 ${TEST_CASE_NAME} + .runtime_test: + extends: .runtime_test_script # Running the runtime tests for every push is too much, so limit to # explicit triggers through the API. only: - triggers - tags - /-runtime-tests$/ - # Keep build directories so the rootfs can be an artifact of the job. The - # runner will clean up those files for us. - # Multiply every emulator timeout by 10 to avoid sporadic failures in - # elastic runners. - script: ./support/testing/run-tests -o test-output/ -d test-dl/ -k --timeout-multiplier 10 ${CI_JOB_NAME} + before_script: + - TEST_CASE_NAME=${CI_JOB_NAME} artifacts: when: always expire_in: 2 weeks diff --git a/.gitlab-ci.yml.in b/.gitlab-ci.yml.in index f519338d63..0b4c65b258 100644 --- a/.gitlab-ci.yml.in +++ b/.gitlab-ci.yml.in @@ -36,8 +36,8 @@ check-package: .defconfig_script: script: - - echo 'Configure Buildroot' - - make ${CI_JOB_NAME} + - echo "Configure Buildroot for ${DEFCONFIG_NAME}" + - make ${DEFCONFIG_NAME} - echo 'Build buildroot' - | make > >(tee build.log |grep '>>>') 2>&1 || { @@ -54,6 +54,8 @@ check-package: - triggers - tags - /-defconfigs$/ + before_script: + - DEFCONFIG_NAME=${CI_JOB_NAME} artifacts: when: always expire_in: 2 weeks @@ -65,18 +67,25 @@ check-package: - output/build/packages-file-list.txt - output/build/*/.config +.runtime_test_script: + # Keep build directories so the rootfs can be an artifact of the job. The + # runner will clean up those files for us. + # Multiply every emulator timeout by 10 to avoid sporadic failures in + # elastic runners. + script: + - echo "Starting runtime test ${TEST_CASE_NAME}" + - ./support/testing/run-tests -o test-output/ -d test-dl/ -k --timeout-multiplier 10 ${TEST_CASE_NAME} + .runtime_test: + extends: .runtime_test_script # Running the runtime tests for every push is too much, so limit to # explicit triggers through the API. only: - triggers - tags - /-runtime-tests$/ - # Keep build directories so the rootfs can be an artifact of the job. The - # runner will clean up those files for us. - # Multiply every emulator timeout by 10 to avoid sporadic failures in - # elastic runners. - script: ./support/testing/run-tests -o test-output/ -d test-dl/ -k --timeout-multiplier 10 ${CI_JOB_NAME} + before_script: + - TEST_CASE_NAME=${CI_JOB_NAME} artifacts: when: always expire_in: 2 weeks