From patchwork Wed Apr 13 15:29:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max X-Patchwork-Id: 610064 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.osmocom.org (lists.osmocom.org [144.76.43.76]) by ozlabs.org (Postfix) with ESMTP id 3qlSRC3v83z9sBX for ; Thu, 14 Apr 2016 01:29:59 +1000 (AEST) Received: from lists.osmocom.org (lists.osmocom.org [144.76.43.76]) by lists.osmocom.org (Postfix) with ESMTP id 65E971C183; Wed, 13 Apr 2016 15:29:54 +0000 (UTC) X-Original-To: openbsc@lists.osmocom.org Delivered-To: openbsc@lists.osmocom.org Received: from mail.sysmocom.de (mail.sysmocom.de [IPv6:2a01:4f8:191:444c::2:4]) by lists.osmocom.org (Postfix) with ESMTP id 115A71C17B for ; Wed, 13 Apr 2016 15:29:52 +0000 (UTC) Received: from mail.sysmocom.de (mail.sysmocom.de [144.76.43.93]) by mail.sysmocom.de (Postfix) with ESMTP id 5CC321AA574; Wed, 13 Apr 2016 15:29:52 +0000 (UTC) Received: from pbell.local (ip5b418565.dynamic.kabel-deutschland.de [91.65.133.101]) by mail.sysmocom.de (Postfix) with ESMTPSA id 0F9DE1AA573; Wed, 13 Apr 2016 15:29:51 +0000 (UTC) From: msuraev@sysmocom.de To: openbsc@lists.osmocom.org Subject: [PATCH] Fix build failure Date: Wed, 13 Apr 2016 17:29:51 +0200 Message-Id: <1460561391-31296-1-git-send-email-msuraev@sysmocom.de> X-Mailer: git-send-email 2.8.1 X-Virus-Scanned: ClamAV using ClamSMTP X-BeenThere: openbsc@lists.osmocom.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Development of OpenBSC, OsmoBSC, OsmoNITB, OsmoCSCN" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Max Errors-To: openbsc-bounces@lists.osmocom.org Sender: "OpenBSC" From: Max After copytree the destination directory might end up not being writable - this causes failure for subsequent writeconfig tests. Force rwx permissions to fix it. --- osmopy/osmotestconfig.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/osmopy/osmotestconfig.py b/osmopy/osmotestconfig.py index 5c981d1..c601e82 100644 --- a/osmopy/osmotestconfig.py +++ b/osmopy/osmotestconfig.py @@ -17,7 +17,7 @@ import os import os.path import time -import sys, shutil +import sys, shutil, stat import tempfile import osmopy.obscvty as obscvty @@ -76,6 +76,7 @@ def copy_config(dirname, config): shutil.rmtree(dirname, True) ign = shutil.ignore_patterns('*.cfg') shutil.copytree(os.path.dirname(config), dirname, ignore=ign) + os.chmod(dirname, stat.S_IRWXU) try: os.stat(dirname)