svn commit: samba r14550 - in branches/SAMBA_4_0/source/pidl: lib/Parse/Pidl/Samba4/NDR tests

jelmer at samba.org jelmer at samba.org
Sat Mar 18 22:16:25 GMT 2006


Author: jelmer
Date: 2006-03-18 22:16:24 +0000 (Sat, 18 Mar 2006)
New Revision: 14550

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14550

Log:
Fix tests

Modified:
   branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
   branches/SAMBA_4_0/source/pidl/tests/Util.pm


Changeset:
Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
===================================================================
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm	2006-03-18 22:02:31 UTC (rev 14549)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm	2006-03-18 22:16:24 UTC (rev 14550)
@@ -2358,7 +2358,7 @@
 	$res_hdr = "";
 	pidl_hdr "/* header auto-generated by pidl */";
 	pidl_hdr "";
-	pidl_hdr "#include \"$gen_header\"";
+	pidl_hdr "#include \"$gen_header\"" if ($gen_header);
 	pidl_hdr "";
 
 	pidl "/* parser auto-generated by pidl */";
@@ -2376,7 +2376,7 @@
 	pidl choose_header("libcli/util/nterr.h", "core/nterr.h");
 	pidl choose_header("librpc/gen_ndr/ndr_misc.h", "gen_ndr/ndr_misc.h");
 	pidl choose_header("librpc/gen_ndr/ndr_dcerpc.h", "gen_ndr/ndr_dcerpc.h");
-	pidl "#include \"$ndr_header\"";
+	pidl "#include \"$ndr_header\"" if ($ndr_header);
 	pidl choose_header("librpc/rpc/dcerpc.h", "dcerpc.h"); #FIXME: This shouldn't be here!
 	pidl "";
 

Modified: branches/SAMBA_4_0/source/pidl/tests/Util.pm
===================================================================
--- branches/SAMBA_4_0/source/pidl/tests/Util.pm	2006-03-18 22:02:31 UTC (rev 14549)
+++ branches/SAMBA_4_0/source/pidl/tests/Util.pm	2006-03-18 22:16:24 UTC (rev 14550)
@@ -15,6 +15,7 @@
 use Parse::Pidl::NDR;
 use Parse::Pidl::Samba4::NDR::Parser;
 use Parse::Pidl::Samba4::Header;
+use Parse::Pidl::Samba4 qw(is_intree);
 
 my $sanecc = 0;
 
@@ -30,17 +31,16 @@
 	ok(defined($header), "($name) generate generic header");
 	my $pndr = Parse::Pidl::NDR::Parse($pidl);
 	ok(defined($pndr), "($name) generate NDR tree");
-	my ($ndrheader,$ndrparser) = Parse::Pidl::Samba4::NDR::Parser::Parse($pndr, "foo");
+	my ($ndrheader,$ndrparser) = Parse::Pidl::Samba4::NDR::Parser::Parse($pndr, undef, undef);
 	ok(defined($ndrparser), "($name) generate NDR parser");
 	ok(defined($ndrheader), "($name) generate NDR header");
 
 SKIP: {
 
-	my $insamba = -f "include/includes.h";
-	my $link = $insamba && 0; # FIXME
+	my $link = is_intree() && 0; # FIXME
 
 	skip "no samba environment available, skipping compilation", 3 
-		if not $insamba;
+		if not is_intree();
 
 	skip "no sane C compiler, skipping compilation", 3
 		if not $sanecc;
@@ -57,9 +57,9 @@
 	#my $cflags = $ENV{CFLAGS};
 	my $cflags = "-Iinclude -Ilib -I.";
 
-	if ($insamba and $link) {
+	if (is_intree() and $link) {
 		open CC, "|cc -x c -o $outfile $cflags -";
-	} elsif ($insamba) {
+	} elsif (is_intree()) {
 			open CC, "|cc -x c -c -o $outfile $cflags -";
 	}
 	print CC "#include \"includes.h\"\n";



More information about the samba-cvs mailing list