X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmini%2Ftest_op_il_seq_point.sh;h=ee235f5c739cb4a91bb87edfe55e0b5bb5a14f3c;hb=023046395bb3d091f5f1dd60ca4da378356d5964;hp=eb42a0279c1faf464a2b0840c7a8b611d95a4a2b;hpb=849623f0aeca7c07dfcc3d5070b8d555515be988;p=mono.git diff --git a/mono/mini/test_op_il_seq_point.sh b/mono/mini/test_op_il_seq_point.sh index eb42a0279c1..ee235f5c739 100755 --- a/mono/mini/test_op_il_seq_point.sh +++ b/mono/mini/test_op_il_seq_point.sh @@ -1,22 +1,28 @@ #!/bin/bash -TEST_FILE=$1 -USE_AOT=$2 +DEFAULT_PROFILE=$1 +TEST_FILE=$2 +USE_AOT=$3 TMP_FILE_PREFIX=$(basename $0).tmp BASEDIR=$(dirname $0) -MONO_PATH=$BASEDIR/../../mcs/class/lib/net_4_x:$BASEDIR +case "$(uname -s)" in + CYGWIN*) PLATFORM_PATH_SEPARATOR=';';; + *) PLATFORM_PATH_SEPARATOR=':';; +esac + +MONO_PATH=$BASEDIR/../../mcs/class/lib/$DEFAULT_PROFILE$PLATFORM_PATH_SEPARATOR$BASEDIR RUNTIME=$BASEDIR/../../runtime/mono-wrapper trap "rm -rf ${TMP_FILE_PREFIX}*" EXIT tmp_file () { - mktemp ./${TMP_FILE_PREFIX}XXXX + mktemp ./${TMP_FILE_PREFIX}XXXXXX } clean_aot () { - rm -rf *.exe.so *.exe.dylib *.exe.dylib.dSYM + rm -rf *.exe.so *.exe.dylib *.exe.dylib.dSYM *.exe.dll } # The test compares the generated native code size between a compilation with and without seq points. @@ -42,15 +48,19 @@ get_method () { } diff_methods () { - TMP_FILE=$(tmp_file) - echo "$(MONO_DEBUG=single-imm-size get_methods $1 $2 $3 $4)" >$TMP_FILE - diff <(cat $TMP_FILE) <(echo "$(MONO_DEBUG=gen-compact-seq-points,single-imm-size get_methods $1 $2 $3 $4)") + TMP_FILE1=$(tmp_file) + TMP_FILE2=$(tmp_file) + echo "$(MONO_DEBUG=no-compact-seq-points,single-imm-size get_methods $1 $2 $3 $4)" >$TMP_FILE1 + echo "$(MONO_DEBUG=single-imm-size get_methods $1 $2 $3 $4)" >$TMP_FILE2 + diff $TMP_FILE1 $TMP_FILE2 } diff_method () { - TMP_FILE=$(tmp_file) - echo "$(MONO_DEBUG=single-imm-size get_method $1 $2 $3 $4 $5)" >$TMP_FILE - sdiff -w 150 <(cat $TMP_FILE) <(echo "$(MONO_DEBUG=gen-compact-seq-points,single-imm-size get_method $1 $2 $3 $4 $5 | grep -Ev il_seq_point)") + TMP_FILE1=$(tmp_file) + TMP_FILE2=$(tmp_file) + echo "$(MONO_DEBUG=no-compact-seq-points,single-imm-size get_method $1 $2 $3 $4 $5)" >$TMP_FILE1 + echo "$(MONO_DEBUG=single-imm-size get_method $1 $2 $3 $4 $5 | grep -Ev il_seq_point)" >$TMP_FILE2 + sdiff -w 150 $TMP_FILE1 $TMP_FILE2 } get_method_name () {