File: test.sh

package info (click to toggle)
ergo 3.5-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 17,044 kB
  • ctags: 6,813
  • sloc: cpp: 91,488; ansic: 15,728; sh: 6,416; makefile: 1,287; yacc: 123; lex: 108
file content (66 lines) | stat: -rwxr-xr-x 1,388 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
#!/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 All matrix library tests OK
else
echo ERROR in matrix library 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