~ubuntu-branches/ubuntu/precise/nss/precise-security

« back to all changes in this revision

Viewing changes to nss/lib/freebl/mpi/all-tests

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2013-11-14 14:58:07 UTC
  • mfrom: (1.1.19)
  • Revision ID: package-import@ubuntu.com-20131114145807-ay302kimn72ovt88
Tags: 3.15.3-0ubuntu0.12.04.1
* SECURITY UPDATE: New upstream release to fix multiple security issues
  and add TLSv1.2 support.
  - CVE-2013-1739
  - CVE-2013-1741
  - CVE-2013-5605
  - CVE-2013-5606
* Adjusted packaging for 3.15.3:
  - debian/patches/*: refreshed.
  - debian/patches/lower-dhe-priority.patch: removed, no longer needed,
    was a workaround for an old version of firefox.
  - debian/libnss3.symbols: added new symbols.
  - debian/rules: updated for new source layout.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# This Source Code Form is subject to the terms of the Mozilla Public
 
3
# License, v. 2.0. If a copy of the MPL was not distributed with this
 
4
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
5
 
 
6
ECHO=/bin/echo
 
7
MAKE=gmake
 
8
 
 
9
$ECHO "\n** Running unit tests for MPI library\n"
 
10
 
 
11
# Build the mpi-test program, which comprises all the unit tests for
 
12
# the MPI library...
 
13
 
 
14
$ECHO "Bringing mpi-test up to date ... "
 
15
if $MAKE mpi-test ; then
 
16
  :
 
17
else
 
18
  $ECHO " "
 
19
  $ECHO "Make failed to build mpi-test."
 
20
  $ECHO " "
 
21
  exit 1
 
22
fi
 
23
 
 
24
if [ ! -x mpi-test ] ; then
 
25
  $ECHO " "
 
26
  $ECHO "Cannot find 'mpi-test' program, testing cannot continue."
 
27
  $ECHO " "
 
28
  exit 1
 
29
fi
 
30
 
 
31
# Get the list of available test suites...
 
32
tests=`./mpi-test list | awk '{print $1}'`
 
33
errs=0
 
34
 
 
35
# Run each test suite and check the result code of mpi-test
 
36
for test in $tests ; do
 
37
  $ECHO "$test ... \c"
 
38
  if ./mpi-test $test ; then
 
39
    $ECHO "passed"
 
40
  else
 
41
    $ECHO "FAILED"
 
42
    errs=1
 
43
  fi
 
44
done
 
45
 
 
46
# If any tests failed, we'll stop at this point
 
47
if [ "$errs" = "0" ] ; then
 
48
  $ECHO "All unit tests passed"
 
49
else
 
50
  $ECHO "One or more tests failed"
 
51
  exit 1
 
52
fi
 
53
 
 
54
# Now try to build the 'pi' program, and see if it can compute the
 
55
# first thousand digits of pi correctly
 
56
$ECHO "\n** Running other tests\n"
 
57
 
 
58
$ECHO "Bringing 'pi' up to date ... "
 
59
if $MAKE pi ; then
 
60
    :
 
61
else
 
62
    $ECHO "\nMake failed to build pi.\n"
 
63
    exit 1
 
64
fi
 
65
 
 
66
if [ ! -x pi ] ; then
 
67
    $ECHO "\nCannot find 'pi' program; testing cannot continue.\n"
 
68
    exit 1
 
69
fi
 
70
 
 
71
./pi 2000 > /tmp/pi.tmp.$$
 
72
if cmp tests/pi2k.txt /tmp/pi.tmp.$$ ; then
 
73
    $ECHO "Okay!  The pi test passes."
 
74
else
 
75
    $ECHO "Oops!  The pi test failed. :("
 
76
    exit 1
 
77
fi
 
78
 
 
79
rm -f /tmp/pi.tmp.$$
 
80
 
 
81
exit 0
 
82
 
 
83
# Here there be dragons