VirtualBox

source: vbox/trunk/src/libs/xpcom18a4/nsprpub/pr/tests/runtests.sh@ 22683

最後變更 在這個檔案從22683是 1,由 vboxsync 提交於 55 年 前

import

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 6.0 KB
 
1#!/bin/sh
2#
3# ***** BEGIN LICENSE BLOCK *****
4# Version: MPL 1.1/GPL 2.0/LGPL 2.1
5#
6# The contents of this file are subject to the Mozilla Public License Version
7# 1.1 (the "License"); you may not use this file except in compliance with
8# the License. You may obtain a copy of the License at
9# http://www.mozilla.org/MPL/
10#
11# Software distributed under the License is distributed on an "AS IS" basis,
12# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13# for the specific language governing rights and limitations under the
14# License.
15#
16# The Original Code is the Netscape Portable Runtime (NSPR).
17#
18# The Initial Developer of the Original Code is
19# Netscape Communications Corporation.
20# Portions created by the Initial Developer are Copyright (C) 1998-2000
21# the Initial Developer. All Rights Reserved.
22#
23# Contributor(s):
24#
25# Alternatively, the contents of this file may be used under the terms of
26# either the GNU General Public License Version 2 or later (the "GPL"), or
27# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28# in which case the provisions of the GPL or the LGPL are applicable instead
29# of those above. If you wish to allow use of your version of this file only
30# under the terms of either the GPL or the LGPL, and not to allow others to
31# use your version of this file under the terms of the MPL, indicate your
32# decision by deleting the provisions above and replace them with the notice
33# and other provisions required by the GPL or the LGPL. If you do not delete
34# the provisions above, a recipient may use your version of this file under
35# the terms of any one of the MPL, the GPL or the LGPL.
36#
37# ***** END LICENSE BLOCK *****
38
39#
40# tests.ksh
41# korn shell script for nspr tests
42#
43
44SYSTEM_INFO=`uname -a`
45OS_ARCH=`uname -s`
46if [ $OS_ARCH = "Windows_NT" ] || [ $OS_ARCH = "OS/2" ]
47then
48 NULL_DEVICE=nul
49else
50 NULL_DEVICE=/dev/null
51fi
52
53#
54# Irrevelant tests
55#
56#bug1test - used to demonstrate a bug on NT
57#bigfile2 - requires 4Gig file creation. See BugZilla #5451
58#bigfile3 - requires 4Gig file creation. See BugZilla #5451
59#dbmalloc - obsolete; originally for testing debug version of nspr's malloc
60#dbmalloc1 - obsolete; originally for testing debug version of nspr's malloc
61#depend - obsolete; used to test a initial spec for library dependencies
62#dceemu - used to tests special functions in NSPR for DCE emulation
63#ipv6 - IPV6 not in use by NSPR clients
64#mbcs - tests use of multi-byte charset for filenames. See BugZilla #25140
65#sproc_ch - obsolete; sproc-based tests for Irix
66#sproc_p - obsolete; sproc-based tests for Irix
67#io_timeoutk - obsolete; subsumed in io_timeout
68#io_timeoutu - obsolete; subsumed in io_timeout
69#prftest1 - obsolete; subsumed by prftest
70#prftest2 - obsolete; subsumed by prftest
71#prselect - obsolete; PR_Select is obsolete
72#select2 - obsolete; PR_Select is obsolete
73#sem - obsolete; PRSemaphore is obsolete
74#stat - for OS2?
75#suspend - private interfaces PR_SuspendAll, PR_ResumeAll, etc..
76#thruput - needs to be run manually as client/server
77#time - used to measure time with native calls and nspr calls
78#tmoacc - should be run with tmocon
79#tmocon - should be run with tmoacc
80#op_noacc - limited use
81#yield - limited use for PR_Yield
82
83#
84# Tests not run (but should)
85#
86
87#forktest (failed on IRIX)
88#nbconn - fails on some platforms
89#poll_er - fails on some platforms? limited use?
90#prpoll - the bad-FD test needs to be moved to a different test
91#sleep - specific to OS/2
92
93LOGFILE=${NSPR_TEST_LOGFILE:-$NULL_DEVICE}
94
95#
96# Tests run on all platforms
97#
98
99TESTS="
100accept
101acceptread
102acceptreademu
103affinity
104alarm
105anonfm
106atomic
107attach
108bigfile
109cleanup
110cltsrv
111concur
112cvar
113cvar2
114dlltest
115dtoa
116errcodes
117exit
118fdcach
119fileio
120foreign
121formattm
122fsync
123gethost
124getproto
125i2l
126initclk
127inrval
128instrumt
129intrio
130intrupt
131io_timeout
132ioconthr
133join
134joinkk
135joinku
136joinuk
137joinuu
138layer
139lazyinit
140libfilename
141lltest
142lock
143lockfile
144logger
145many_cv
146multiwait
147nameshm1
148nblayer
149nonblock
150ntioto
151ntoh
152op_2long
153op_excl
154op_filnf
155op_filok
156op_nofil
157parent
158peek
159perf
160pipeping
161pipeping2
162pipeself
163poll_nm
164poll_to
165pollable
166prftest
167primblok
168provider
169prpollml
170ranfile
171randseed
172rwlocktest
173sel_spd
174selct_er
175selct_nm
176selct_to
177selintr
178sema
179semaerr
180semaping
181sendzlf
182server_test
183servr_kk
184servr_uk
185servr_ku
186servr_uu
187short_thread
188sigpipe
189socket
190sockopt
191sockping
192sprintf
193stack
194stdio
195str2addr
196strod
197switch
198system
199testbit
200testfile
201threads
202timemac
203timetest
204tpd
205udpsrv
206vercheck
207version
208writev
209xnotify
210zerolen"
211
212rval=0
213
214
215#
216# When set, value of the environment variable TEST_TIMEOUT is the maximum
217# time (secs) allowed for a test program beyond which it is terminated.
218# If TEST_TIMEOUT is not set or if it's value is 0, then test programs
219# don't timeout.
220#
221# Running runtests.ksh under MKS toolkit on NT, 95, 98 does not cause
222# timeout detection correctly. For these platforms, do not attempt timeout
223# test. (lth).
224#
225#
226
227OS_PLATFORM=`uname`
228OBJDIR=`basename $PWD`
229printf "\nNSPR Test Results - $OBJDIR\n\n"
230printf "BEGIN\t\t\t`date`\n"
231printf "NSPR_TEST_LOGFILE\t${LOGFILE}\n\n"
232printf "Test\t\t\tResult\n\n"
233if [ $OS_PLATFORM = "Windows_95" ] || [ $OS_PLATFORM = "Windows_98" ] || [ $OS_PLATFORM = "Windows_NT" ] || [ $OS_PLATFORM = "OS/2" ] ; then
234 for prog in $TESTS
235 do
236 printf "$prog"
237 printf "\nBEGIN TEST: $prog\n\n" >> ${LOGFILE} 2>&1
238 ./$prog >> ${LOGFILE} 2>&1
239 if [ 0 = $? ] ; then
240 printf "\t\t\tPassed\n";
241 else
242 printf "\t\t\tFAILED\n";
243 rval=1
244 fi;
245 printf "\nEND TEST: $prog\n\n" >> ${LOGFILE} 2>&1
246 done
247else
248 for prog in $TESTS
249 do
250 printf "$prog"
251 printf "\nBEGIN TEST: $prog\n\n" >> ${LOGFILE} 2>&1
252 export test_rval
253 ./$prog >> ${LOGFILE} 2>&1 &
254 test_pid=$!
255 sleep_pid=0
256 if test -n "$TEST_TIMEOUT" && test "$TEST_TIMEOUT" -gt 0
257 then
258 (sleep $TEST_TIMEOUT; kill $test_pid >/dev/null 2>&1 ) &
259 sleep_pid=$!
260 fi
261 wait $test_pid
262 test_rval=$?
263 [ $sleep_pid -eq 0 ] || kill $sleep_pid >/dev/null 2>&1
264 if [ 0 = $test_rval ] ; then
265 printf "\t\t\tPassed\n";
266 else
267 printf "\t\t\tFAILED\n";
268 rval=1
269 fi;
270 printf "\nEND TEST: $prog\n\n" >> ${LOGFILE} 2>&1
271 done
272fi;
273
274printf "END\t\t\t`date`\n"
275exit $rval
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette