1#! /bin/sh 2# Copyright (c) 2002, Intel Corporation. All rights reserved. 3# Created by: julie.n.fleischer 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# Use to build and run tests for a specific area 9 10BASEDIR="$(dirname "$0")/../conformance/interfaces" 11 12usage() 13{ 14 cat <<EOF 15usage: $(basename "$0") [AIO|MEM|MSG|SEM|SIG|THR|TMR|TPS] 16 17Build and run the tests for POSIX area specified by the 3 letter tag 18in the POSIX spec 19 20EOF 21} 22 23run_option_group_tests() 24{ 25 for test_script in $(find $1 -name run.sh | sort); do 26 (cd "$(dirname "$test_script")" && ./$(basename "$test_script")) 27 done 28} 29 30case $1 in 31AIO) 32 echo "Executing asynchronous I/O tests" 33 run_option_group_tests "$BASEDIR/aio_*" 34 run_option_group_tests "$BASEDIR/lio_listio" 35 ;; 36SIG) 37 echo "Executing signals tests" 38 run_option_group_tests "$BASEDIR/sig*" 39 run_option_group_tests $BASEDIR/raise 40 run_option_group_tests $BASEDIR/kill 41 run_option_group_tests $BASEDIR/killpg 42 run_option_group_tests $BASEDIR/pthread_kill 43 run_option_group_tests $BASEDIR/pthread_sigmask 44 ;; 45SEM) 46 echo "Executing semaphores tests" 47 run_option_group_tests "$BASEDIR/sem*" 48 ;; 49THR) 50 echo "Executing threads tests" 51 run_option_group_tests "$BASEDIR/pthread_*" 52 ;; 53TMR) 54 echo "Executing timers and clocks tests" 55 run_option_group_tests "$BASEDIR/time*" 56 run_option_group_tests "$BASEDIR/*time" 57 run_option_group_tests "$BASEDIR/clock*" 58 run_option_group_tests $BASEDIR/nanosleep 59 ;; 60MSG) 61 echo "Executing message queues tests" 62 run_option_group_tests "$BASEDIR/mq_*" 63 ;; 64TPS) 65 echo "Executing process and thread scheduling tests" 66 run_option_group_tests "$BASEDIR/*sched*" 67 ;; 68MEM) 69 echo "Executing mapped, process and shared memory tests" 70 run_option_group_tests "$BASEDIR/m*lock*" 71 run_option_group_tests "$BASEDIR/m*map" 72 run_option_group_tests "$BASEDIR/shm_*" 73 ;; 74*) 75 usage 76 exit 1 77 ;; 78esac 79 80echo "****Tests Complete****" 81