diff options
author | 2012-05-31 00:26:36 -0400 | |
---|---|---|
committer | 2012-05-31 00:26:36 -0400 | |
commit | e148d677d931e534bd0e2f40baa4d82f513d8d3b (patch) | |
tree | c19c53c114f7b7e5e91223974b7edfbb12fe66c6 /tests | |
parent | gcc-config: fix old wrapper removal code path (diff) | |
download | gcc-config-e148d677d931e534bd0e2f40baa4d82f513d8d3b.tar.gz gcc-config-e148d677d931e534bd0e2f40baa4d82f513d8d3b.tar.bz2 gcc-config-e148d677d931e534bd0e2f40baa4d82f513d8d3b.zip |
tests: verify removal of wrappers between diff configsv1.7.2
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@gentoo.org>
Diffstat (limited to 'tests')
3 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 --- /dev/null +++ b/tests/rw-multi-native-configs/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.0/gfortran 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 --- /dev/null +++ b/tests/rw-multi-native-configs/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.1/g++ |