public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/elfix:master commit in: tests/paxmodule/, tests/revdeppaxtest/
@ 2012-12-16 18:29 Anthony G. Basile
  0 siblings, 0 replies; 2+ messages in thread
From: Anthony G. Basile @ 2012-12-16 18:29 UTC (permalink / raw
  To: gentoo-commits

commit:     f1ca0d51dc9fa5a115601771859036529c9f67fe
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 16 18:28:46 2012 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> 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"


^ permalink raw reply related	[flat|nested] 2+ messages in thread
* [gentoo-commits] proj/elfix:master commit in: tests/paxmodule/, tests/revdeppaxtest/
@ 2013-05-20 15:18 Anthony G. Basile
  0 siblings, 0 replies; 2+ messages in thread
From: Anthony G. Basile @ 2013-05-20 15:18 UTC (permalink / raw
  To: gentoo-commits

commit:     7fee50678ef2847c13ea75f268c5a6bf3d1e9c83
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 15:18:03 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=7fee5067

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] 2+ messages in thread

end of thread, other threads:[~2013-05-20 15:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-16 18:29 [gentoo-commits] proj/elfix:master commit in: tests/paxmodule/, tests/revdeppaxtest/ Anthony G. Basile
  -- strict thread matches above, loose matches on Subject: below --
2013-05-20 15:18 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