Mercurial > hg > Members > anatofuz > nqp-cbc-tools
changeset 3:665fb2069aec
add logs2.pl
author | anatofuz |
---|---|
date | Sun, 04 Nov 2018 23:50:30 +0900 |
parents | 752703db4caf |
children | 8911efdfcc50 |
files | check-cbc-nqp-test.sh check-nqp-test.sh dotest logs2.pl |
diffstat | 2 files changed, 42 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/dotest Sun Nov 04 13:45:43 2018 +0900 +++ b/dotest Sun Nov 04 23:50:30 2018 +0900 @@ -1,13 +1,18 @@ #!/bin/zsh -if [ $# -ne 1 ]; then - echo 'useage:) $cbc-tools/this.sh vmtest/nqp' +if [ $# -lt 1 ]; then + echo 'useage:) $cbc-tools/this.sh vmtest/nqp origin' exit 1 fi NQP_ORIGINAL="/mnt/dalmore-home/one/src/MoarVM_Original/nqp" TARGET_DIR=$1 +MOAR="../MoarVM/moar" +if [ $# -eq 2 ]; then + MOAR="../../build_perl6/MoarVM_Orig/bin/moar" +fi +echo "*use ${MOAR}" foreach testmoar (${TARGET_DIR}/*.moarvm) echo $testmoar - ../MoarVM/moar --libpath=${NQP_ORIGINAL}/gen/moar/stage2 $testmoar + ${MOAR} --libpath=${NQP_ORIGINAL}/gen/moar/stage2 $testmoar end
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/logs2.pl Sun Nov 04 23:50:30 2018 +0900 @@ -0,0 +1,34 @@ +use strict; +use warnings; + +my $originlog = shift; +my $cbclog = shift; + +open my $ofh, '<', $originlog; +open my $cfh, '<', $cbclog; + +while (1){ + my $orig_line; + do { + $orig_line = <$ofh>; + } while (!($orig_line =~ /\$\d+ \= (\d+)/)); + + $orig_line = $1; + + my $c_line; + + do { + $c_line = <$cfh>; + } while (!($c_line !~ /\$\d+ \= (\d+)/)); + + $c_line = $1; + + if ($c_line != $orig_line){ + print "*"; + print "$orig_line : $c_line\n"; + exit 0; + } + + print "$orig_line : $c_line\n"; + +}