Blame tests/RUN_auto

Packit b099d7
#!/bin/csh
Packit b099d7
Packit b099d7
# Copyright (c) 1987-2012, The Open Group. All rights reserved.
Packit b099d7
#
Packit b099d7
# Motif
Packit b099d7
#
Packit b099d7
# These libraries and programs are free software; you can
Packit b099d7
# redistribute them and/or modify them under the terms of the GNU
Packit b099d7
# Lesser General Public License as published by the Free Software
Packit b099d7
# Foundation; either version 2 of the License, or (at your option)
Packit b099d7
# any later version.
Packit b099d7
#
Packit b099d7
# These libraries and programs are distributed in the hope that
Packit b099d7
# they will be useful, but WITHOUT ANY WARRANTY; without even the
Packit b099d7
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
Packit b099d7
# PURPOSE. See the GNU Lesser General Public License for more
Packit b099d7
# details.
Packit b099d7
#
Packit b099d7
# You should have received a copy of the GNU Lesser General Public
Packit b099d7
# License along with these librararies and programs; if not, write
Packit b099d7
# to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
Packit b099d7
# Floor, Boston, MA 02110-1301 USA
Packit b099d7
Packit b099d7
# This script runs all the automated QATS tests, as defined in the file
Packit b099d7
# ./tests/General/dirsAuto
Packit b099d7
Packit b099d7
unalias cd
Packit b099d7
unalias pushd
Packit b099d7
unalias popd
Packit b099d7
Packit b099d7
set dirs_file = ../tests/General/dirsAuto
Packit b099d7
set DIR_LIST = (`cat $dirs_file`)
Packit b099d7
set TESTS_HOME = $cwd
Packit b099d7
Packit b099d7
echo  $#DIR_LIST " directories of automated tests to be run..."
Packit b099d7
Packit b099d7
setenv LIBRARY_PATH /usr/X11R6/lib:$TESTS_HOME/Manual/lib/Common:$TESTS_HOME/../lib/Xm/.libs:$TESTS_HOME/Auto/lib/Common:$TESTS_HOME/Auto/lib/Create:$TESTS_HOME/Auto/lib/Script:$TESTS_HOME/Auto/lib/Synth:$TESTS_HOME/Auto/lib/Util:$TESTS_HOME/Auto/lib/Visual:
Packit b099d7
setenv LD_LIBRARY_PATH /usr/X11R6/lib:$TESTS_HOME/Manual/lib/Common:$TESTS_HOME/../lib/Xm/.libs:$TESTS_HOME/Auto/lib/Common:$TESTS_HOME/Auto/lib/Create:$TESTS_HOME/Auto/lib/Script:$TESTS_HOME/Auto/lib/Synth:$TESTS_HOME/Auto/lib/Util:$TESTS_HOME/Auto/lib/Visual:
Packit b099d7
setenv C_INCLUDE_PATH $TESTS_HOME/../lib
Packit b099d7
setenv C_PATH $TESTS_HOME/../lib
Packit b099d7
setenv MOTIF_HOME $TESTS_HOME/..
Packit b099d7
Packit b099d7
# Go to the Geberal dir nad change permision to execute
Packit b099d7
cd $TESTS_HOME/General/bin && chmod +x *
Packit b099d7
cd $TESTS_HOME/General && chmod +x RUN_template
Packit b099d7
Packit b099d7
# Go to the lib dir and build the Motif libraries local
Packit b099d7
Packit b099d7
if (-d environment) then
Packit b099d7
	cp -f -r environment ~/
Packit b099d7
endif
Packit b099d7
Packit b099d7
Packit b099d7
cd $TESTS_HOME/../lib
Packit b099d7
echo "I am in " $cwd
Packit b099d7
Packit b099d7
set DIR = $cwd:t
Packit b099d7
if (-e make.$DIR) then
Packit b099d7
	mv -f  make.$DIR make.$DIR.bak
Packit b099d7
endif
Packit b099d7
make -i >& make.$DIR
Packit b099d7
Packit b099d7
# Go to Auto and Manual directories and build libs
Packit b099d7
cd $TESTS_HOME && ./BUILD_libs
Packit b099d7
Packit b099d7
# Go to each automated test directory
Packit b099d7
Packit b099d7
foreach dir ($DIR_LIST)
Packit b099d7
        cd $TESTS_HOME/../$dir
Packit b099d7
	set DIR = $cwd:t
Packit b099d7
        echo "I am in " $cwd
Packit b099d7
Packit b099d7
# Make all the automated tests and supporting files in this directory
Packit b099d7
Packit b099d7
        if (-e make.$DIR) then
Packit b099d7
                mv -f  make.$DIR make.$DIR.bak
Packit b099d7
        endif
Packit b099d7
	imake -DUseInstalled -DAUTOMATION -I$TESTS_HOME/../config/cf -TMotif.tmpl -TImake.tmpl  -DTOPDIR=$TESTS_HOME/..
Packit b099d7
	make Makefiles
Packit b099d7
        make -i 
Packit b099d7
# Use the generated RUN script to run all of the tests
Packit b099d7
Packit b099d7
        if (-e RUN.$DIR) then
Packit b099d7
            if (-e RUN.$DIR.bak) then
Packit b099d7
                rm -f RUN.$DIR.bak
Packit b099d7
            endif
Packit b099d7
            mv -f RUN.$DIR RUN.$DIR.bak
Packit b099d7
        endif
Packit b099d7
	setenv PATH $PATH":"$cwd
Packit b099d7
        ./RUN -T -D 0 -genrep -Dir -d :0.0 >& RUN.$DIR
Packit b099d7
Packit b099d7
# Clean up the directory before leaving
Packit b099d7
        make clean
Packit b099d7
Packit b099d7
end