public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/gcc-config:master commit in: tests/rw-multi-native-configs/, ...
@ 2012-05-31  4:31 Mike Frysinger
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2012-05-31  4:31 UTC (permalink / raw
  To: gentoo-commits

commit:     e148d677d931e534bd0e2f40baa4d82f513d8d3b
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Thu May 31 04:26:36 2012 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Thu May 31 04:26:36 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gcc-config.git;a=commit;h=e148d677

tests: verify removal of wrappers between diff configs

If we switch from a gcc that supports fortran to one that doesn't, we
want to make sure to clean out the old wrappers.  Add test cases to
verify those paths.

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

---
 tests/rw-multi-native-configs/test.select |   22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/tests/rw-multi-native-configs/test.select b/tests/rw-multi-native-configs/test.select
index 5912d2c..c6d9daf 100644
--- a/tests/rw-multi-native-configs/test.select
+++ b/tests/rw-multi-native-configs/test.select
@@ -1,9 +1,27 @@
 #!/bin/bash
+
+baseline=( {,${CHOST}-}{cpp,gcc} cc )
+gxx=( {,${CHOST}-}g++ )
+gfortran=( {,${CHOST}-}gfortran )
+
 for (( i = 1; i < 4; ++i )) ; do
-	rm -f usr/bin/*
 	gcc-config -C ${i} "$@" || exit 1
-	for b in {,${CHOST}-}{cpp,gcc} cc ; do
+
+	do_want=( "${baseline[@]}" )
+	dont_want=( )
+	case ${i} in
+	1)	do_want+=( "${gfortran[@]}" )
+		dont_want+=( "${gxx[@]}" ) ;;
+	2)	do_want+=( "${gxx[@]}" )
+		dont_want+=( "${gfortran[@]}" ) ;;
+	3)	dont_want+=( "${gfortran[@]}" "${gxx[@]}" ) ;;
+	esac
+
+	for b in "${do_want[@]}" ; do
 		[[ -e usr/bin/${b} ]] || exit 1
 	done
+	for b in "${dont_want[@]}" ; do
+		[[ -e usr/bin/${b} ]] && exit 1
+	done
 	[[ -e etc/env.d/04gcc-${CHOST} ]] || exit 1
 done

diff --git a/tests/rw-multi-native-configs/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.0/gfortran b/tests/rw-multi-native-configs/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.0/gfortran
new file mode 100755
index 0000000..e69de29

diff --git a/tests/rw-multi-native-configs/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.1/g++ b/tests/rw-multi-native-configs/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.1/g++
new file mode 100755
index 0000000..e69de29



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

only message in thread, other threads:[~2012-05-31  4:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-31  4:31 [gentoo-commits] proj/gcc-config:master commit in: tests/rw-multi-native-configs/, Mike Frysinger

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