diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-11-22 10:23:33 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-11-22 18:58:18 +0100 |
commit | c5bb39d64d26398e9ebf8f973059a887c271052f (patch) | |
tree | dcfdd5e20aa898a8d4f46118e4fced655c76b8a5 | |
parent | a2972f7d8c5037acb278d9f9fb6e51cef479de1a (diff) |
Add exectest.pl OLD-/NEW-FAILURE for deliberate idlc/unoidl diffs
Change-Id: I653522d8ebaac3329f368c102d14041c6b49d41d
-rw-r--r-- | idlc/CustomTarget_parser_test.mk | 20 | ||||
-rw-r--r-- | solenv/bin/exectest.pl | 11 |
2 files changed, 18 insertions, 13 deletions
diff --git a/idlc/CustomTarget_parser_test.mk b/idlc/CustomTarget_parser_test.mk index acb3a8fd7ec5..84b01d9cb45e 100644 --- a/idlc/CustomTarget_parser_test.mk +++ b/idlc/CustomTarget_parser_test.mk @@ -28,52 +28,52 @@ $(call gb_CustomTarget_get_target,idlc/parser_test) : \ $(call gb_Helper_abbreviate_dirs,( \ $(PERL) $(SRCDIR)/solenv/bin/exectest.pl \ $(SRCDIR)/idlc/test/parser/attribute.tests \ - $(call gb_CustomTarget_get_workdir,idlc/parser_test)/in.idl \ + $(call gb_CustomTarget_get_workdir,idlc/parser_test)/in.idl 0 \ $(call gb_Executable_get_command,idlc) \ -O $(call gb_CustomTarget_get_workdir,idlc/parser_test) {} && \ $(PERL) $(SRCDIR)/solenv/bin/exectest.pl \ $(SRCDIR)/idlc/test/parser/constant.tests \ - $(call gb_CustomTarget_get_workdir,idlc/parser_test)/in.idl \ + $(call gb_CustomTarget_get_workdir,idlc/parser_test)/in.idl 0 \ $(call gb_Executable_get_command,idlc) \ -O $(call gb_CustomTarget_get_workdir,idlc/parser_test) {} && \ $(PERL) $(SRCDIR)/solenv/bin/exectest.pl \ $(SRCDIR)/idlc/test/parser/constructor.tests \ - $(call gb_CustomTarget_get_workdir,idlc/parser_test)/in.idl \ + $(call gb_CustomTarget_get_workdir,idlc/parser_test)/in.idl 0 \ $(call gb_Executable_get_command,idlc) \ -O $(call gb_CustomTarget_get_workdir,idlc/parser_test) {} && \ $(PERL) $(SRCDIR)/solenv/bin/exectest.pl \ $(SRCDIR)/idlc/test/parser/interfaceinheritance.tests \ - $(call gb_CustomTarget_get_workdir,idlc/parser_test)/in.idl \ + $(call gb_CustomTarget_get_workdir,idlc/parser_test)/in.idl 0 \ $(call gb_Executable_get_command,idlc) \ -O $(call gb_CustomTarget_get_workdir,idlc/parser_test) {} && \ $(PERL) $(SRCDIR)/solenv/bin/exectest.pl \ $(SRCDIR)/idlc/test/parser/methodoverload.tests \ - $(call gb_CustomTarget_get_workdir,idlc/parser_test)/in.idl \ + $(call gb_CustomTarget_get_workdir,idlc/parser_test)/in.idl 0 \ $(call gb_Executable_get_command,idlc) \ -O $(call gb_CustomTarget_get_workdir,idlc/parser_test) {} && \ $(PERL) $(SRCDIR)/solenv/bin/exectest.pl \ $(SRCDIR)/idlc/test/parser/oldstyle.tests \ - $(call gb_CustomTarget_get_workdir,idlc/parser_test)/in.idl \ + $(call gb_CustomTarget_get_workdir,idlc/parser_test)/in.idl 0 \ $(call gb_Executable_get_command,idlc) \ -O $(call gb_CustomTarget_get_workdir,idlc/parser_test) {} && \ $(PERL) $(SRCDIR)/solenv/bin/exectest.pl \ $(SRCDIR)/idlc/test/parser/polystruct.tests \ - $(call gb_CustomTarget_get_workdir,idlc/parser_test)/in.idl \ + $(call gb_CustomTarget_get_workdir,idlc/parser_test)/in.idl 0 \ $(call gb_Executable_get_command,idlc) \ -O $(call gb_CustomTarget_get_workdir,idlc/parser_test) {} && \ $(PERL) $(SRCDIR)/solenv/bin/exectest.pl \ $(SRCDIR)/idlc/test/parser/published.tests \ - $(call gb_CustomTarget_get_workdir,idlc/parser_test)/in.idl \ + $(call gb_CustomTarget_get_workdir,idlc/parser_test)/in.idl 0 \ $(call gb_Executable_get_command,idlc) \ -O $(call gb_CustomTarget_get_workdir,idlc/parser_test) {} && \ $(PERL) $(SRCDIR)/solenv/bin/exectest.pl \ $(SRCDIR)/idlc/test/parser/struct.tests \ - $(call gb_CustomTarget_get_workdir,idlc/parser_test)/in.idl \ + $(call gb_CustomTarget_get_workdir,idlc/parser_test)/in.idl 0 \ $(call gb_Executable_get_command,idlc) \ -O $(call gb_CustomTarget_get_workdir,idlc/parser_test) {} && \ $(PERL) $(SRCDIR)/solenv/bin/exectest.pl \ $(SRCDIR)/idlc/test/parser/typedef.tests \ - $(call gb_CustomTarget_get_workdir,idlc/parser_test)/in.idl \ + $(call gb_CustomTarget_get_workdir,idlc/parser_test)/in.idl 0 \ $(call gb_Executable_get_command,idlc) \ -O $(call gb_CustomTarget_get_workdir,idlc/parser_test) {}) \ > $@.log 2>&1 || (cat $@.log && false)) diff --git a/solenv/bin/exectest.pl b/solenv/bin/exectest.pl index bd9b5f373cdc..248cd7b0c81a 100644 --- a/solenv/bin/exectest.pl +++ b/solenv/bin/exectest.pl @@ -23,18 +23,21 @@ sub encode($) return $arg } -$#ARGV >= 2 - or die "Usage: $0 <input file> <temp file> <command> <arguments...>"; +$#ARGV >= 3 + or die "Usage: $0 <input file> <temp file> <new?> <command> <arguments...>"; open INPUT, '<', $ARGV[0] or die "cannot open $ARGV[0]: $!"; shift @ARGV; $temp = $ARGV[0]; shift @ARGV; +$new = $ARGV[0]; +shift @ARGV; $failed = 0; $open = 0; while (1) { $eof = eof INPUT; $in = <INPUT> unless $eof; - if ($eof || $in =~ /^EXPECT (SUCCESS|FAILURE) "([^"]*)"?:\n$/) + if ($eof + || $in =~ /^EXPECT (SUCCESS|FAILURE|NEW-FAILURE|OLD-FAILURE) "([^"]*)"?:\n$/) { if ($open) { @@ -86,6 +89,8 @@ while (1) { } last if $eof; $expect = $1; + $expect = ($new ? 'FAILURE' : 'SUCCESS') if $expect eq 'NEW-FAILURE'; + $expect = ($new ? 'SUCCESS' : 'FAILURE') if $expect eq 'OLD-FAILURE'; $title = $2; open OUTPUT, '>', $temp or die "cannot open $temp: $!"; $open = 1; |