From patchwork Fri Nov 4 15:23:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 9412729 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 40AAC6022E for ; Fri, 4 Nov 2016 15:24:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 324252B1B5 for ; Fri, 4 Nov 2016 15:24:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 25BF72B1BC; Fri, 4 Nov 2016 15:24:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B44A62B1B5 for ; Fri, 4 Nov 2016 15:24:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C33196E9C2; Fri, 4 Nov 2016 15:24:20 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8178A6E9C0 for ; Fri, 4 Nov 2016 15:24:19 +0000 (UTC) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 04 Nov 2016 08:23:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,443,1473145200"; d="scan'208";a="782454612" Received: from jnikula-mobl.fi.intel.com (HELO localhost) ([10.237.72.162]) by FMSMGA003.fm.intel.com with ESMTP; 04 Nov 2016 08:23:50 -0700 From: Jani Nikula To: intel-gfx@lists.freedesktop.org Date: Fri, 4 Nov 2016 17:23:43 +0200 Message-Id: <1478273024-18495-1-git-send-email-jani.nikula@intel.com> X-Mailer: git-send-email 2.1.4 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Cc: jani.nikula@intel.com Subject: [Intel-gfx] [maintainer-tools PATCH 1/2] dim: add a variable for nightly.conf X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP We'll change the name at some point, add some indirection, with a generic variable name. Signed-off-by: Jani Nikula --- dim | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/dim b/dim index 8e95cd82407f..6a23c868856c 100755 --- a/dim +++ b/dim @@ -92,6 +92,9 @@ addr_intel_gfx="intel-gfx@lists.freedesktop.org" addr_dri_devel="dri-devel@lists.freedesktop.org" addr_intel_qa="\"Christophe Prigent\" " +# integration configuration +integration_config=nightly.conf + # # Command line options. # @@ -163,7 +166,7 @@ if [ "$subcommand" != "setup" -a "$subcommand" != "help" -a "$subcommand" != "us # Internal configuration that depends on a sane setup. # - dim_branches=`(source $DIM_PREFIX/drm-intel-rerere/nightly.conf ; echo $nightly_branches) | \ + dim_branches=`(source $DIM_PREFIX/drm-intel-rerere/$integration_config ; echo $nightly_branches) | \ xargs -n 1 echo | grep '^origin' | sed -e 's/^origin\///'` fi @@ -280,14 +283,16 @@ function dim_rebuild_nightly cd $rerere if [[ `git status --porcelain | grep -v "^[ ?][ ?]" | wc -l` -gt 0 ]]; then - warn_or_fail "-nightly configuration file not commited" + warn_or_fail "integration configuration file $integration_config not commited" fi - echo -n "Updating rerere cache and nightly.conf... " + echo -n "Updating rerere cache... " update_rerere_cache >& /dev/null echo "Done." - source $rerere/nightly.conf + echo -n "Reloading $integration_config... " + source $rerere/$integration_config + echo "Done." cd $DIM_PREFIX/$integration_branch if ! git branch --list $integration_branch | grep '\*' >& /dev/null ; then @@ -383,7 +388,6 @@ function dim_rebuild_nightly update_linux_next } - # push branch $1, rebuild nightly. the rest of the arguments are passed to git # push. function dim_push_branch @@ -615,9 +619,9 @@ function dim_create_branch git push $DRY_RUN $DIM_DRM_INTEL_REMOTE +$branch --set-upstream cd $DIM_PREFIX/drm-intel-rerere $DRY echo "nightly_branches=\"\$nightly_branches origin/$branch\"" \ - >> nightly.conf - $DRY git add nightly.conf - $DRY git commit --quiet -m "Adding $branch to -nightly" + >> $integration_config + $DRY git add $integration_config + $DRY git commit --quiet -m "Add $branch to $integration_config" } function dim_remove_branch @@ -643,9 +647,9 @@ function dim_remove_branch $DRY git fetch origin --prune cd $DIM_PREFIX/drm-intel-rerere full_branch="origin/$branch" - $DRY sed -e "/${full_branch//\//\\\/}/d" -i nightly.conf - $DRY git add nightly.conf - $DRY git commit --quiet -m "Deleted $branch and removed from -nightly" + $DRY sed -e "/${full_branch//\//\\\/}/d" -i $integration_config + $DRY git add $integration_config + $DRY git commit --quiet -m "Remove $branch from $integration_config" } function dim_cd