]>
Commit | Line | Data |
---|---|---|
490019cf A |
1 | #!/bin/bash |
2 | ||
3 | TESTDIR=$PWD/ | |
4 | MPMMTEST="${TESTDIR}/MPMMtest" | |
5 | MPMMTEST_64="${TESTDIR}/MPMMtest_64" | |
6 | KQMPMMTEST="${TESTDIR}/KQMPMMtest" | |
7 | KQMPMMTEST_64="${TESTDIR}/KQMPMMtest_64" | |
8 | ||
39037602 A |
9 | is_64_bit_env() |
10 | { | |
11 | ARCHOUT=`file /bin/ls` | |
12 | if [[ $ARCHOUT == *"64-bit"* ]]; then | |
13 | return 1 | |
14 | fi | |
15 | return 0 | |
16 | } | |
17 | ||
18 | is_64_bit_env; | |
19 | IS_64BIT_BOOTED_OS=$? | |
20 | ||
490019cf A |
21 | if [ -e $MPMMTEST ] && [ -x $MPMMTEST ] |
22 | then | |
5ba3f43e A |
23 | # Tentatively test for 32-bit support |
24 | $MPMMTEST -count 0 -servers 0 -clients 0 &> /dev/null | |
25 | ||
26 | if [ $? == 0 ] || [ $IS_64BIT_BOOTED_OS == 0 ] | |
27 | then | |
28 | # If 32-bit support appears to be present OR if this is not | |
29 | # a 64-bit environment, run the test. | |
30 | echo ""; echo " Running $MPMMTEST"; | |
31 | $MPMMTEST -perf || { x=$?; echo "$MPMMTEST failed $x "; exit $x; } | |
32 | fi | |
490019cf A |
33 | fi |
34 | ||
39037602 | 35 | if [ -e $MPMMTEST_64 ] && [ -x $MPMMTEST_64 ] && [ $IS_64BIT_BOOTED_OS == 1 ] |
490019cf A |
36 | then |
37 | echo ""; echo " Running $MPMMTEST_64" | |
38 | $MPMMTEST_64 -perf || { x=$?; echo "$MPMMTEST_64 failed $x"; exit $x; } | |
39 | fi | |
40 | ||
41 | if [ -e $KQMPMMTEST ] && [ -x $KQMPMMTEST ] | |
42 | then | |
5ba3f43e A |
43 | # Tentatively test for 32-bit support |
44 | $KQMPMMTEST -count 0 -servers 0 -clients 0 &> /dev/null | |
45 | ||
46 | if [ $? == 0 ] || [ $IS_64BIT_BOOTED_OS == 0 ] | |
47 | then | |
48 | # If 32-bit support appears to be present OR if this is not | |
49 | # a 64-bit environment, run the test. | |
50 | echo ""; echo " Running $KQMPMMTEST" | |
51 | $KQMPMMTEST -perf || { x=$?; echo "$KQMPMMTEST failed $x"; exit $x; } | |
52 | fi | |
490019cf A |
53 | fi |
54 | ||
39037602 | 55 | if [ -e $KQMPMMTEST_64 ] && [ -x $KQMPMMTEST_64 ] && [ $IS_64BIT_BOOTED_OS == 1 ] |
490019cf A |
56 | then |
57 | echo ""; echo " Running $KQMPMMTEST_64" | |
58 | $KQMPMMTEST_64 -perf || { x=$?; echo "$KQMPMMTEST_64 failed $x"; exit $?; } | |
59 | fi | |
60 | ||
61 | echo ""; echo " SUCCESS"; | |
62 | exit 0; | |
63 | ||
64 |