2420 |
30 Jan 11 |
peter |
#! /bin/sh |
2420 |
30 Jan 11 |
peter |
# $Id$ |
2420 |
30 Jan 11 |
peter |
3 |
# |
3855 |
02 Jan 20 |
peter |
# Copyright (C) 2011, 2012, 2013, 2014, 2019 Peter Johansson |
2420 |
30 Jan 11 |
peter |
5 |
# |
2420 |
30 Jan 11 |
peter |
# This file is part of the yat library, http://dev.thep.lu.se/yat |
2420 |
30 Jan 11 |
peter |
7 |
# |
2420 |
30 Jan 11 |
peter |
# The yat library is free software; you can redistribute it |
2420 |
30 Jan 11 |
peter |
# and/or modify it under the terms of the GNU General Public License as |
2420 |
30 Jan 11 |
peter |
# published by the Free Software Foundation; either version 3 of the |
2420 |
30 Jan 11 |
peter |
# License, or (at your option) any later version. |
2420 |
30 Jan 11 |
peter |
12 |
# |
2420 |
30 Jan 11 |
peter |
# The yat library is distributed in the hope that it will be useful, |
2420 |
30 Jan 11 |
peter |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
2420 |
30 Jan 11 |
peter |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2420 |
30 Jan 11 |
peter |
# General Public License for more details. |
2420 |
30 Jan 11 |
peter |
17 |
# |
2420 |
30 Jan 11 |
peter |
# You should have received a copy of the GNU General Public License |
2420 |
30 Jan 11 |
peter |
# along with yat. If not, see <http://www.gnu.org/licenses/>. |
2420 |
30 Jan 11 |
peter |
20 |
|
2420 |
30 Jan 11 |
peter |
21 |
|
2420 |
30 Jan 11 |
peter |
# test basic features of yat-config |
2420 |
30 Jan 11 |
peter |
23 |
|
2420 |
30 Jan 11 |
peter |
24 |
required= |
2420 |
30 Jan 11 |
peter |
25 |
|
2420 |
30 Jan 11 |
peter |
26 |
set -e |
2420 |
30 Jan 11 |
peter |
27 |
|
3036 |
03 Jun 13 |
peter |
28 |
. test/init.sh || exit 99 |
2420 |
30 Jan 11 |
peter |
29 |
|
2421 |
31 Jan 11 |
peter |
30 |
prog=${abs_top_builddir}/build_support/for_installation/yat-config |
2420 |
30 Jan 11 |
peter |
31 |
|
2420 |
30 Jan 11 |
peter |
32 |
for opt in --version --help; do |
2473 |
13 Apr 11 |
peter |
33 |
run sh 0 $prog ${opt} |
2520 |
11 Jul 11 |
peter |
34 |
test -s stderr && exit_fail |
2520 |
11 Jul 11 |
peter |
35 |
test -s stdout || exit_fail |
2420 |
30 Jan 11 |
peter |
36 |
done |
2420 |
30 Jan 11 |
peter |
37 |
|
2520 |
11 Jul 11 |
peter |
38 |
grep '^installed=yes' ${prog} || exit_fail |
2420 |
30 Jan 11 |
peter |
39 |
|
2473 |
13 Apr 11 |
peter |
40 |
run sh 1 $prog --nonsense |
2520 |
11 Jul 11 |
peter |
41 |
grep 'yat-config:.*--nonsense' stderr || exit_fail |
2520 |
11 Jul 11 |
peter |
42 |
grep 'for more information' stderr || exit_fail |
2473 |
13 Apr 11 |
peter |
43 |
|
3188 |
25 Mar 14 |
peter |
44 |
run sh 0 $prog --libs |
3188 |
25 Mar 14 |
peter |
45 |
grep lgsl stdout || exit_fail |
3188 |
25 Mar 14 |
peter |
46 |
|
3188 |
25 Mar 14 |
peter |
47 |
run sh 0 $prog --libs-without-cblas |
3188 |
25 Mar 14 |
peter |
48 |
grep lgsl stdout || exit_fail |
3188 |
25 Mar 14 |
peter |
49 |
|
3800 |
04 May 19 |
peter |
50 |
sh $prog --cxx > expected.txt |
3800 |
04 May 19 |
peter |
51 |
sh $prog --cppflags >> expected.txt |
3800 |
04 May 19 |
peter |
52 |
sh $prog --cxxflags >> expected.txt |
3800 |
04 May 19 |
peter |
53 |
cat expected.txt |
3800 |
04 May 19 |
peter |
54 |
tr ' \t' '\n\n' < expected.txt | sort -u | grep '[a-z]' > expected2.txt |
3800 |
04 May 19 |
peter |
55 |
cat expected2.txt |
3800 |
04 May 19 |
peter |
56 |
run sh 0 $prog --cxx --cppflags --cxxflags |
3800 |
04 May 19 |
peter |
57 |
tr ' \t' '\n\n' < stdout | sort -u | grep '[a-z]' > stdout2 |
3800 |
04 May 19 |
peter |
58 |
cat stdout2 |
3800 |
04 May 19 |
peter |
59 |
diff -u expected2.txt stdout2 || exit_fail |
3800 |
04 May 19 |
peter |
60 |
|
2622 |
06 Nov 11 |
peter |
61 |
exit_success |