File: test.sh

package info (click to toggle)
ergo 3.8.2-1.1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 17,568 kB
  • sloc: cpp: 94,763; ansic: 17,785; sh: 10,701; makefile: 1,403; yacc: 127; lex: 116; awk: 23
file content (77 lines) | stat: -rwxr-xr-x 1,647 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/bin/sh

if test "$top_builddir" = ""; then
    top_builddir=..
fi
if test "$top_srcdir" = ""; then
    top_srcdir=..
fi

# Prefer gawk - we know exactly what it can do.
# awk on Sun does not support functions, need to use nawk for this
if gawk '{print 1}'</dev/null > /dev/null 2>&1; then
   AWK=gawk
elif nawk '{print 1}'</dev/null > /dev/null 2>&1; then
   AWK=nawk
else
   AWK=awk
fi


echo Testing code sensitive for some compilers when OpenMP is used  
"$top_builddir"/source/matrix/omptest
if [ $? -eq 0 ]
then
echo OpenMP test OK
else
echo ERROR in OpenMP test
exit 1
fi

echo
echo Testing matrix library
"$top_builddir"/source/matrix/mattest "$top_srcdir"/source/matrix
if [ $? -eq 0 ]
then
echo Matrix library tests OK
else
echo ERROR in matrix library test
exit 1
fi

echo
echo Testing matrix library LanczosSeveralLargestEig functionality
"$top_builddir"/source/matrix/mattest_lan
if [ $? -eq 0 ]
then
echo Matrix library LanczosSeveralLargestEig test OK
else
echo ERROR in matrix library LanczosSeveralLargestEig test
exit 1
fi

if [ "$RUN_BENCHMARK" = "1" ]
    then
    echo
    echo Benchmark of matrix library:
    "$top_builddir"/source/matrix/matbench 1000 
    if [ $? -eq 0 ]
	then
	echo Benchmark returned OK
    else
	echo ERROR in matrix library benchmark
	exit 1
    fi
    echo Running BLAS benchmark, result in file blastime.m
    "$top_builddir"/source/matrix/blastime 100 blastime.m 
    if [ $? -eq 0 ]
	then
	echo BLAS benchmark returned OK
    else
	echo ERROR in BLAS benchmark
	exit 1
    fi
else
    echo Skipping matrix library benchmark
    echo To run benchmark, run check as: make check RUN_BENCHMARK=1
fi