From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 1F36E1381F3 for ; Sun, 16 Dec 2012 18:29:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8BF0121C062; Sun, 16 Dec 2012 18:29:46 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 06C3521C062 for ; Sun, 16 Dec 2012 18:29:45 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E50FA33DCA8 for ; Sun, 16 Dec 2012 18:29:44 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 2AB6DE543C for ; Sun, 16 Dec 2012 18:29:43 +0000 (UTC) From: "Anthony G. Basile" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" Message-ID: <1355682539.f1ca0d51dc9fa5a115601771859036529c9f67fe.blueness@gentoo> Subject: [gentoo-commits] proj/elfix:master commit in: tests/paxmodule/, tests/revdeppaxtest/ X-VCS-Repository: proj/elfix X-VCS-Files: tests/paxmodule/paxmodtest.sh tests/revdeppaxtest/Makefile.am tests/revdeppaxtest/revdeptest.sh X-VCS-Directories: tests/paxmodule/ tests/revdeppaxtest/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: f1ca0d51dc9fa5a115601771859036529c9f67fe X-VCS-Branch: master Date: Sun, 16 Dec 2012 18:29:43 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 60d03872-c065-4c79-93f1-137383df5f72 X-Archives-Hash: 3b20834591cf038a3129340c74e41da4 commit: f1ca0d51dc9fa5a115601771859036529c9f67fe Author: Anthony G. Basile gentoo org> AuthorDate: Sun Dec 16 18:28:46 2012 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Sun Dec 16 18:28:59 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=f1ca0d51 tests/revdeppaxtest: no longer require python module to be installed This is basically the same logic as in commit 1b8987b294acdcb452c3eefce2c14b4b0385a064 --- tests/paxmodule/paxmodtest.sh | 11 +++++------ tests/revdeppaxtest/Makefile.am | 2 +- tests/revdeppaxtest/revdeptest.sh | 30 +++++++++++++++++++++++++++--- 3 files changed, 33 insertions(+), 10 deletions(-) diff --git a/tests/paxmodule/paxmodtest.sh b/tests/paxmodule/paxmodtest.sh index 319dad5..4f25d7c 100755 --- a/tests/paxmodule/paxmodtest.sh +++ b/tests/paxmodule/paxmodtest.sh @@ -1,5 +1,10 @@ #!/bin/bash +echo "================================================================================" +echo +echo " RUNNIG PAXMODULE TEST" +echo + verbose=${1-0} shift @@ -7,11 +12,6 @@ TESTFILE="$(pwd)/dummy" PAXCTLNG="../../src/paxctl-ng" PYPAXCTL="../../scripts/pypaxctl" -echo "================================================================================" -echo -echo " RUNNIG PAXMODULE TEST" - - unamem=$(uname -m) pythonversion=$(python --version 2>&1) pythonversion=$(echo ${pythonversion} | awk '{ print $2 }') @@ -33,7 +33,6 @@ if [ ! -d ${PYTHONPATH} ]; then ( cd ../../scripts; exec ./setup.py build ) >/dev/null fi -echo count=0 diff --git a/tests/revdeppaxtest/Makefile.am b/tests/revdeppaxtest/Makefile.am index a12b32e..1b44295 100644 --- a/tests/revdeppaxtest/Makefile.am +++ b/tests/revdeppaxtest/Makefile.am @@ -18,6 +18,6 @@ check_SCRIPTS = revdeptest TEST = $(check_SCRIPTS) revdeptest: - ./revdeptest.sh 0 + ./revdeptest.sh 0 $(CFLAGS) EXTRA_DIST = revdeptest.sh diff --git a/tests/revdeppaxtest/revdeptest.sh b/tests/revdeppaxtest/revdeptest.sh index 3b6d83a..034cd6c 100755 --- a/tests/revdeppaxtest/revdeptest.sh +++ b/tests/revdeppaxtest/revdeptest.sh @@ -1,14 +1,14 @@ #!/bin/bash -verbose=${1-0} - echo "================================================================================" echo echo " REVDEP-PAX TEST" echo -ID=$(id -u) +verbose=${1-0} +shift +ID=$(id -u) if [ "$ID" != 0 ]; then echo " MUST BE ROOT" echo @@ -51,6 +51,30 @@ if [ "${verbose}" = 0 ] ;then echo -n " " fi +unamem=$(uname -m) +pythonversion=$(python --version 2>&1) +pythonversion=$(echo ${pythonversion} | awk '{ print $2 }') +pythonversion=${pythonversion%\.*} +PYTHONPATH="../../scripts/build/lib.linux-${unamem}-${pythonversion}" + +# Assume the pax.so module is built if the path exists +# otherwise build it ourselves! +if [ ! -d ${PYTHONPATH} ]; then + echo " (Re)building pax module" + + #NOTE: the last -D or -U wins as it does for gcc $CFLAGS + for f in $@; do + [ $f = "-UXTPAX" ] && unset XTPAX + [ $f = "-DXTPAX" ] && XTPAX=1 + [ $f = "-UPTPAX" ] && unset PTPAX + [ $f = "-DPTPAX" ] && PTPAX=1 + done + export XTPAX + export PTPAX + + ( cd ../../scripts; exec ./setup.py build ) >/dev/null +fi + count=0 for bf in "R" "r" "Rr"