12926Sphk#! /bin/sh
22886Sphk# Copyright (c) 2002, Intel Corporation. All rights reserved.
32886Sphk# Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
493150Sphk# This file is licensed under the GPL license.  For the full content
52886Sphk# of this license, see the COPYING file at the top level of this
62886Sphk# source tree.
72886Sphk#
82886Sphk# Use to build and run tests for a specific area
950479Speter
102886SphkBASEDIR=conformance/interfaces
118857Srgrimes
122886Sphkusage()
132886Sphk{
142886Sphk    cat <<EOF 
152886SphkUsage: $0 [AIO|MEM|MSG|SEM|SIG|THR|TMR|TPS]
162886Sphk
172886SphkBuild and run the tests for POSIX area specified by the 3 letter tag
182971Sphkin the POSIX spec
192971Sphk
202971SphkEOF
212971Sphk}
222971Sphk
2313917Sphkruntests()
2417946Sphk{
2517946Sphk	for test in `ls -d $1`; do
262971Sphk		POSIX_TARGET=$test make build-tests
272926Sphk		POSIX_TARGET=$test make run-tests
282971Sphk	done
292886Sphk}
3015456Sphk
312971Sphkcase $1 in
3213917Sphk  AIO) echo "Executing asynchronous I/O tests"
3317946Sphk	runtests "$BASEDIR/aio_*"
3417946Sphk	runtests "$BASEDIR/lio_listio"
352886Sphk	;;
3617946Sphk  SIG) echo "Executing signals tests"
3717946Sphk	runtests "$BASEDIR/sig*"
3817946Sphk	runtests $BASEDIR/raise
392886Sphk	runtests $BASEDIR/kill
402886Sphk	runtests $BASEDIR/killpg
412886Sphk	runtests $BASEDIR/pthread_kill
4256126Skris	runtests $BASEDIR/pthread_sigmask
432886Sphk	;;
442886Sphk  SEM) echo "Executing semaphores tests"
456889Sphk	runtests "$BASEDIR/sem*"
462886Sphk	;;
476889Sphk  THR) echo "Executing threads tests"
486889Sphk	runtests "$BASEDIR/pthread_*"
492886Sphk	;;
508857Srgrimes  TMR) echo "Executing timers and clocks tests"
512886Sphk	runtests "$BASEDIR/time*"
5217946Sphk	runtests "$BASEDIR/*time"
532926Sphk	runtests "$BASEDIR/clock*"
5413917Sphk	runtests $BASEDIR/nanosleep
556889Sphk	;;
5617946Sphk  MSG) echo "Executing message queues tests"
5713917Sphk	runtests "$BASEDIR/mq_*"
588857Srgrimes	;;
5913917Sphk  TPS) echo "Executing process and thread scheduling tests"
602886Sphk	runtests "$BASEDIR/*sched*"
612886Sphk	;;
6215456Sphk  MEM) echo "Executing mapped, process and shared memory tests"
6317946Sphk	runtests "$BASEDIR/m*lock*"
6417946Sphk	runtests "$BASEDIR/m*map"
6517946Sphk	runtests "$BASEDIR/shm_*"
6617946Sphk	;;
6717946Sphk  *)	usage
6856126Skris	exit 1
6956126Skris	;;
7056126Skrisesac
712886Sphk
722886Sphkecho "****Tests Complete****"
738857Srgrimes