From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1026014-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 39A57138330
	for <garchives@archives.gentoo.org>; Fri, 25 May 2018 19:44:38 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 0CC42E088A;
	Fri, 25 May 2018 19:44:37 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id D94B5E088A
	for <gentoo-commits@lists.gentoo.org>; Fri, 25 May 2018 19:44:36 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 770DB335C29
	for <gentoo-commits@lists.gentoo.org>; Fri, 25 May 2018 19:44:35 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id C1AF42A9
	for <gentoo-commits@lists.gentoo.org>; Fri, 25 May 2018 19:44:33 +0000 (UTC)
From: "Fabian Groffen" <grobian@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" <grobian@gentoo.org>
Message-ID: <1527277446.0bf775500d26e7ed9ef3a5b0d68d68deca70fcbb.grobian@gentoo>
Subject: [gentoo-commits] proj/portage:prefix commit in: /
X-VCS-Repository: proj/portage
X-VCS-Files: travis.sh
X-VCS-Directories: /
X-VCS-Committer: grobian
X-VCS-Committer-Name: Fabian Groffen
X-VCS-Revision: 0bf775500d26e7ed9ef3a5b0d68d68deca70fcbb
X-VCS-Branch: prefix
Date: Fri, 25 May 2018 19:44:33 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 96640a4c-f4cb-4521-b10d-b58f5d543670
X-Archives-Hash: e98b588e349694f65abaabd693c0567e

commit:     0bf775500d26e7ed9ef3a5b0d68d68deca70fcbb
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Fri May 25 19:44:06 2018 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Fri May 25 19:44:06 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=0bf77550

travis.sh: add helper script to run tests

 travis.sh | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/travis.sh b/travis.sh
new file mode 100755
index 000000000..3c03149e6
--- /dev/null
+++ b/travis.sh
@@ -0,0 +1,32 @@
+#!/usr/bin/env bash
+
+# this script runs the tests as Travis would do (.travis.yml) and can be
+# used to test the Prefix branch of portage on a non-Prefix system
+
+: ${TMPDIR=/var/tmp}
+
+HERE=$(dirname $(realpath ${BASH_SOURCE[0]}))
+REPO=${HERE##*/}.$$
+
+cd ${TMPDIR}
+git clone ${HERE} ${REPO}
+
+cd ${REPO}
+printf "[build_ext]\nportage-ext-modules=true" >> setup.cfg
+find . -type f -exec \
+    sed -e "s|@PORTAGE_EPREFIX@||" \
+		-e "s|@PORTAGE_BASE@|${PWD}|" \
+        -e "s|@PORTAGE_MV@|$(type -P mv)|" \
+        -e "s|@PORTAGE_BASH@|$(type -P bash)|" \
+        -e "s|@PREFIX_PORTAGE_PYTHON@|$(type -P python)|" \
+        -e "s|@DEFAULT_PATH@|${EPREFIX}/usr/bin:${EPREFIX}/bin|" \
+        -e "s|@EXTRA_PATH@|${EPREFIX}/usr/sbin:${EPREFIX}/sbin|" \
+        -e "s|@portagegroup@|$(id -gn)|" \
+        -e "s|@portageuser@|$(id -un)|" \
+        -e "s|@rootuser@|$(id -un)|" \
+        -e "s|@rootuid@|$(id -u)|" \
+        -e "s|@rootgid@|$(id -g)|" \
+        -e "s|@sysconfdir@|${EPREFIX}/etc|" \
+        -i '{}' +
+unset EPREFIX
+./setup.py test