summaryrefslogtreecommitdiff
path: root/source4/pidl/tests
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-03-18 22:16:24 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:58:44 -0500
commitfb67b0d99a2744272767d88f48416154d7150443 (patch)
treeba22f584611f415e118ce1f34fb28185d3882e36 /source4/pidl/tests
parentf200d553fb30abe75314c5be8181da2b0dc0b57d (diff)
downloadsamba-fb67b0d99a2744272767d88f48416154d7150443.tar.gz
samba-fb67b0d99a2744272767d88f48416154d7150443.tar.bz2
samba-fb67b0d99a2744272767d88f48416154d7150443.zip
r14550: Fix tests
(This used to be commit 765fd852e789371f6b6361acd7603f8056ac14a9)
Diffstat (limited to 'source4/pidl/tests')
-rw-r--r--source4/pidl/tests/Util.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/source4/pidl/tests/Util.pm b/source4/pidl/tests/Util.pm
index cd2ba2a37e..37177cc730 100644
--- a/source4/pidl/tests/Util.pm
+++ b/source4/pidl/tests/Util.pm
@@ -15,6 +15,7 @@ use Parse::Pidl::IDL;
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 @@ sub test_samba4_ndr($$$)
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 @@ SKIP: {
#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";