1#!/bin/sh
2# Copyright (c) 2002, Intel Corporation. All rights reserved.
3# Created by:  crystal.xiong REMOVE-THIS AT intel DOT com
4# This file is licensed under the GPL license.  For the full content
5# of this license, see the COPYING file at the top level of this
6# source tree.
7#
8# Run all the tests in the semaphore stress area.
9
10# Helper functions
11RunTest()
12{
13	echo "TEST: " $1 $2
14	TOTAL=$TOTAL+1
15	./$1 $2
16	if [ $? == 0 ]; then
17		PASS=$PASS+1
18		echo -ne "\t\t\t***TEST PASSED***\n\n"
19	else
20		FAIL=$FAIL+1
21		echo -ne "\t\t\t***TEST FAILED***\n\n"
22	fi
23}
24
25# Main program
26
27declare -i TOTAL=0
28declare -i PASS=0
29declare -i FAIL=0
30
31# Add lists of tests to these variables for execution
32TESTS="multi_con_pro.test"
33
34echo "Run the semaphore stress tests"
35echo "=========================================="
36
37RunTest $TESTS 100
38
39echo
40echo -ne "\t\t****************\n"
41echo -ne "\t\t* TOTAL:  " $TOTAL "\n"
42echo -ne "\t\t* PASSED: " $PASS "\n"
43echo -ne "\t\t* FAILED: " $FAIL "\n"
44echo -ne "\t\t****************\n"
45
46exit 0
47
48
49