public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/elfix:elfix-0.8.x commit in: tests/paxmodule/, tests/revdeppaxtest/
@ 2013-05-20 20:02 Anthony G. Basile
  0 siblings, 0 replies; only message in thread
From: Anthony G. Basile @ 2013-05-20 20:02 UTC (permalink / raw
  To: gentoo-commits

commit:     130711ec3d255b8649daf79e74f26b49c153327c
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Mon May 20 15:18:03 2013 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Mon May 20 20:00:42 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=130711ec

tests/{paxmodule,revdeppaxtest}: make path resolutions more robust

---
 tests/paxmodule/paxmodtest.sh     |   30 +++++++++++++++---------------
 tests/revdeppaxtest/revdeptest.sh |   34 ++++++++++++++++------------------
 2 files changed, 31 insertions(+), 33 deletions(-)

diff --git a/tests/paxmodule/paxmodtest.sh b/tests/paxmodule/paxmodtest.sh
index fb0b280..8e831bf 100755
--- a/tests/paxmodule/paxmodtest.sh
+++ b/tests/paxmodule/paxmodtest.sh
@@ -26,28 +26,28 @@ verbose=${1-0}
 shift
 
 TESTFILE="$(pwd)/dummy"
-PAXCTLNG="../../src/paxctl-ng"
-PYPAXCTL="../../scripts/pypaxctl"
+PAXCTLNG="$(pwd)/../../src/paxctl-ng"
+PYPAXCTL="$(pwd)/../../scripts/pypaxctl"
 
 unamem=$(uname -m)
 pythonversion=$(python --version 2>&1)
 pythonversion=$(echo ${pythonversion} | awk '{ print $2 }')
 pythonversion=${pythonversion%\.*}
-PYTHONPATH="../../scripts/build/lib.linux-${unamem}-${pythonversion}"
+export PYTHONPATH="$(pwd)/../../scripts/build/lib.linux-${unamem}-${pythonversion}"
+
+#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
 
-if [ ! -d ${PYTHONPATH} ]; then
+if [ -d ${PYTHONPATH} ]; then
+  rm -rf ${PYTHONPATH}
   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
 

diff --git a/tests/revdeppaxtest/revdeptest.sh b/tests/revdeppaxtest/revdeptest.sh
index 84e67b6..e8380e8 100755
--- a/tests/revdeppaxtest/revdeptest.sh
+++ b/tests/revdeppaxtest/revdeptest.sh
@@ -33,8 +33,8 @@ if [ "$ID" != 0 ]; then
   exit 1
 fi
 
-PAXCTLNG="../../src/paxctl-ng"
-REVDEPPAX="../../scripts/revdep-pax"
+PAXCTLNG="$(pwd)/../../src/paxctl-ng"
+REVDEPPAX="$(pwd)/../../scripts/revdep-pax"
 
 LIBSPATH="$(pwd)/.libs"
 BINARY="revdepbin"
@@ -65,23 +65,21 @@ 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
+export PYTHONPATH="$(pwd)/../../scripts/build/lib.linux-${unamem}-${pythonversion}"
+
+#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
 
+if [ -d ${PYTHONPATH} ]; then
+  rm -rf ${PYTHONPATH}
+  echo " (Re)building pax module"
   ( cd ../../scripts; exec ./setup.py build ) >/dev/null
 fi
 


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-05-20 20:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-20 20:02 [gentoo-commits] proj/elfix:elfix-0.8.x commit in: tests/paxmodule/, tests/revdeppaxtest/ Anthony G. Basile

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox