1#! /bin/sh -f 2# %CopyrightBegin% 3# 4# Copyright Ericsson AB 2009-2016. All Rights Reserved. 5# 6# Licensed under the Apache License, Version 2.0 (the "License"); 7# you may not use this file except in compliance with the License. 8# You may obtain a copy of the License at 9# 10# http://www.apache.org/licenses/LICENSE-2.0 11# 12# Unless required by applicable law or agreed to in writing, software 13# distributed under the License is distributed on an "AS IS" BASIS, 14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15# See the License for the specific language governing permissions and 16# limitations under the License. 17# 18# %CopyrightEnd% 19 20# Usage: rtt [-cerl] <args to erlang startup script> 21 22emu=erl 23while [ $# -gt 0 ]; do 24 case "$1" in 25 "-cerl") 26 shift 27 emu="$ERL_TOP/bin/cerl" 28 ;; 29 *) 30 break 31 ;; 32 esac 33done 34 35log=test_log_$$ 36latest=test_log_latest 37args=${1+"$@"} 38 39erlcmd="$emu -sname test_server -smp -pa ../../reltool/ebin $p $args -reltool_test_verbose true -reltool_test_timeout" 40 41echo "Give the following command in order to see the outcome:" 42echo "" 43echo " less $log" 44 45rm "$latest" 2>/dev/null 46ln -s "$log" "$latest" 47touch "$log" 48 49ostype=`uname -s` 50if [ "$ostype" = "SunOS" ] ; then 51 /usr/openwin/bin/xterm -T "Testing reltool" -l -lf "$log" -e $erlcmd & 52else 53 xterm -T "Testing reltool" -e script -f -c "$erlcmd" "$log" & 54fi 55 56tail -f "$log" | egrep 'Eval|<ERROR>|NYI' 57