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 1C09F1381F3 for ; Sat, 15 Dec 2012 17:19:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3225321C015; Sat, 15 Dec 2012 17:19:29 +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 AB30721C015 for ; Sat, 15 Dec 2012 17:19:28 +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 B7DB833DCBA for ; Sat, 15 Dec 2012 17:19:27 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 57135E543C for ; Sat, 15 Dec 2012 17:19:26 +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: <1355591942.1b8987b294acdcb452c3eefce2c14b4b0385a064.blueness@gentoo> Subject: [gentoo-commits] proj/elfix:master commit in: tests/paxmodule/ X-VCS-Repository: proj/elfix X-VCS-Files: tests/paxmodule/Makefile.am tests/paxmodule/paxmodtest.sh X-VCS-Directories: tests/paxmodule/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: 1b8987b294acdcb452c3eefce2c14b4b0385a064 X-VCS-Branch: master Date: Sat, 15 Dec 2012 17:19:26 +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: 94d627eb-41fc-4cbd-b919-225dde3b91bc X-Archives-Hash: 3ccd6e319078903aaa348834c454abf8 commit: 1b8987b294acdcb452c3eefce2c14b4b0385a064 Author: Anthony G. Basile gentoo org> AuthorDate: Sat Dec 15 17:14:05 2012 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Sat Dec 15 17:19:02 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=1b8987b2 tests/paxmodule: no longer require python module to be installed --- tests/paxmodule/Makefile.am | 2 +- tests/paxmodule/paxmodtest.sh | 31 +++++++++++++++++++++++++++---- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/tests/paxmodule/Makefile.am b/tests/paxmodule/Makefile.am index 6c5930d..86f3acb 100644 --- a/tests/paxmodule/Makefile.am +++ b/tests/paxmodule/Makefile.am @@ -9,4 +9,4 @@ check_SCRIPTS = paxmodtest TEST = $(check_SCRIPTS) paxmodtest: - ./paxmodtest.sh 0 + ./paxmodtest.sh 0 $(CFLAGS) diff --git a/tests/paxmodule/paxmodtest.sh b/tests/paxmodule/paxmodtest.sh index b820d5e..319dad5 100755 --- a/tests/paxmodule/paxmodtest.sh +++ b/tests/paxmodule/paxmodtest.sh @@ -1,19 +1,42 @@ #!/bin/bash verbose=${1-0} +shift -PWD=$(pwd) -TESTFILE="${PWD}"/dummy +TESTFILE="$(pwd)/dummy" PAXCTLNG="../../src/paxctl-ng" PYPAXCTL="../../scripts/pypaxctl" -count=0 - echo "================================================================================" echo echo " RUNNIG PAXMODULE TEST" + + +unamem=$(uname -m) +pythonversion=$(python --version 2>&1) +pythonversion=$(echo ${pythonversion} | awk '{ print $2 }') +pythonversion=${pythonversion%\.*} +PYTHONPATH="../../scripts/build/lib.linux-${unamem}-${pythonversion}" + +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 echo +count=0 + for pf in "p" "P" "-"; do for ef in "e" "E" "-"; do for mf in "m" "M" "-"; do