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 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
|
#! /bin/sh
# PCP QA Test No. 188
# exercise __pmMktime
#
# Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
#
seq=`basename $0`
echo "QA output created by $seq"
# get standard filters
. ./common.product
. ./common.filter
rm -f $seq.out
if [ $PCP_PLATFORM = linux ] ; then
# Linux is all over the shop here!
#
if [ -f /etc/SuSE-release ]
then
case `cat /etc/SuSE-release`
in
'SUSE LINUX Enterprise Server 9 '*|\
'SUSE Linux Enterprise Server 10 '*|\
'SUSE Linux Enterprise Server 11 '*|\
'SUSE Linux Enterprise Server 12 '*|\
'openSUSE '*)
ln $seq.linux $seq.out
;;
esac
elif [ -f /etc/redhat-release ]
then
case `cat /etc/redhat-release`
in
'Fedora Core release 2 '*)
ln $seq.linux.fc2 $seq.out
;;
'Fedora Core release 6 '*)
ln $seq.linux.fc6 $seq.out
;;
'Fedora release 7'*)
ln $seq.linux.fc6 $seq.out
;;
*)
ln $seq.linux $seq.out
;;
esac
elif [ -f /etc/debian_version ]
then
ln $seq.linux $seq.out
elif [ -f /etc/slackware-version ]
then
ln $seq.linux $seq.out
elif [ -f /etc/arch-release ]
then
ln $seq.linux $seq.out
elif [ -f /etc/os-release ]
then
if grep 'openSUSE Leap 15\.' /etc/os-release >/dev/null
then
ln $seq.linux $seq.out
elif grep 'openSUSE Leap 16\.' /etc/os-release >/dev/null
then
ln $seq.darwin $seq.out
fi
fi
# if any of the rules above matched we have $seq.out, otherwise ...
#
if [ ! -f $seq.out ]
then
# this is some old folklore ... better to handle in the explicit
# case above if possible
#
if which rpm >/dev/null 2>&1
then
case `rpm -q glibc`
in
glibc-1.*|glibc-2.[01].*|glibc-2.1[0-9]-*|glibc-2.2.[0-4]-*|glibc-2.3.3-*)
ln $seq.linux $seq.out
;;
*)
ln $seq.linux.fc2 $seq.out
;;
esac
elif which emerge >/dev/null 2>&1
then
# Gentoo ... looking for a line like ...
# sys-libs/glibc-2.12.2 was built with the following:
version="`emerge --info glibc | sed -n -e '/was built with/{
s/ was built with.*//
s/.*\///
p
}'`"
case "$version"
in
# only have the glibc versions we have verified the output
# for
glibc-2\.1[23][-.]*|glibc-2\.2[016][-.]*)
ln $seq.linux $seq.out
;;
*)
echo "Arrgh ... don't know what to do with glibc version $version"
exit 1
;;
esac
else
echo "Arrg ... don't know how to determine glibc version"
exit 1
fi
fi
elif [ $PCP_PLATFORM = darwin -o $PCP_PLATFORM = netbsd -o $PCP_PLATFORM = openbsd ]
then
ln $seq.darwin $seq.out
elif [ $PCP_PLATFORM = solaris ]
then
ln $seq.solaris $seq.out
elif [ $PCP_PLATFORM = freebsd ]
then
version=`uname -rs | sed -e 's/FreeBSD //'`
case "$version"
in
12.*)
ln $seq.linux $seq.out
;;
13.*)
ln $seq.solaris $seq.out
;;
14.*|15.*)
ln $seq.freebsd $seq.out
;;
*)
echo "bozo! ... need FreeBSD rule for version $version"
exit
;;
esac
else
echo "bozo! no rule for $PCP_PLATFORM"
exit
fi
sts=0
trap "rm -f $tmp.*; exit \$sts" 0 1 2 3 15
# real QA test starts here
# dodge daylight saving nonsense
#
TZ=EST-11; export TZ
src/xmktime
|