From patchwork Thu Oct 16 19:15:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas De Schampheleire X-Patchwork-Id: 400354 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 98E0814010C for ; Fri, 17 Oct 2014 06:16:18 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id C38CBA24F8; Thu, 16 Oct 2014 19:16:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SFq2HGkbtW-a; Thu, 16 Oct 2014 19:16:17 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 39F28A24F1; Thu, 16 Oct 2014 19:16:17 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id AFB561C235D for ; Thu, 16 Oct 2014 19:16:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id A68E1A24ED for ; Thu, 16 Oct 2014 19:16:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gP-H6FwX-mLc for ; Thu, 16 Oct 2014 19:16:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com [209.85.217.173]) by fraxinus.osuosl.org (Postfix) with ESMTPS id EA65FA24F0 for ; Thu, 16 Oct 2014 19:16:14 +0000 (UTC) Received: by mail-lb0-f173.google.com with SMTP id 10so3346185lbg.4 for ; Thu, 16 Oct 2014 12:16:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=TrtySHILM85vmW/o443QemDGy1nK9uKmPUijMlC3hqk=; b=TW7LDx1qeIqBepS6iX/eevxrOkoQdeJULxb+RTjiIWdhREFD6EDJe/AnR0w41QpCXJ N6+U+2pgDAOb5RV3c1wmrmBihvUengAr3dq8yOr87GhtSnbV23Sd2hWfzUTXNTV2pAOL 1LzgCqMBSWbN3YGLG9VUOoG4LVM41NOa0PsbrpgAkWrANYPEY1VsznRTu2SJqn07e7CM 03qqwNwbedRI+KU/7U7juGMQwRlNovK3/z1XuV5xHhJZSnO8rLhstzymyCPBOLwnh0m/ DDw/qJi1YH2uljjy96Mb+Kvd+A//+cgJOtM4esi5JypuBSKgerz+b+GkLjKpktwPcNOR w7xQ== X-Received: by 10.152.45.105 with SMTP id l9mr3736134lam.69.1413486973085; Thu, 16 Oct 2014 12:16:13 -0700 (PDT) Received: from localhost.localdomain (d54c62eeb.access.telenet.be. [84.198.46.235]) by mx.google.com with ESMTPSA id tl8sm8044772lbb.47.2014.10.16.12.16.12 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 16 Oct 2014 12:16:12 -0700 (PDT) From: Thomas De Schampheleire To: thomas.petazzoni@free-electrons.com Date: Thu, 16 Oct 2014 21:15:57 +0200 Message-Id: <1413486964-5183-1-git-send-email-patrickdepinguin@gmail.com> X-Mailer: git-send-email 1.8.5.1 Cc: Thomas De Schampheleire , buildroot@buildroot.org Subject: [Buildroot] [PATCH buildroot-test 1/8] autobuild-run: check-requirements does not need to know the login details X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Thomas De Schampheleire check-requirements simply has to know if the results have to be sent, so it can check on some extra requirements. The username and password are irrelevant here. This commit introduces a boolean variable do_send_results to hide these details. Signed-off-by: Thomas De Schampheleire --- scripts/autobuild-run | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/autobuild-run b/scripts/autobuild-run index 7497001..2ead1f2 100755 --- a/scripts/autobuild-run +++ b/scripts/autobuild-run @@ -85,12 +85,12 @@ def check_version(): print "ERROR: script version too old, please upgrade." sys.exit(1) -def check_requirements(http_login, http_password): +def check_requirements(do_send_results=False): devnull = open(os.devnull, "w") needed_progs = ["make", "git", "gcc", "timeout"] missing_requirements = False - if http_login and http_password: + if do_send_results: needed_progs.append("curl") for prog in needed_progs: @@ -553,8 +553,9 @@ if __name__ == '__main__': check_version() sysinfo = SystemInfo() (ninstances, njobs, http_login, http_password, submitter) = config_get() - check_requirements(http_login, http_password) - if http_login is None or http_password is None: + do_send_results = http_login and http_password + check_requirements(do_send_results) + if not do_send_results: print "WARN: due to the lack of http login/password details, results will not be submitted" print "WARN: tarballs of results will be kept locally only" def sigterm_handler(signum, frame):