diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-06-19 16:17:08 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-07-03 00:58:48 +0200 |
commit | b9cf441f82eb2ac8368ac7aac8ef8152d056958e (patch) | |
tree | 494f050eb508639f3905dcf28f3d70cdc7585537 /pidl/tests | |
parent | 909d42278a80bb463108e3716053da7155301753 (diff) | |
download | samba-b9cf441f82eb2ac8368ac7aac8ef8152d056958e.tar.gz samba-b9cf441f82eb2ac8368ac7aac8ef8152d056958e.tar.xz samba-b9cf441f82eb2ac8368ac7aac8ef8152d056958e.zip |
pidl: Don't run compile tests inside the tree, won't work yet.
Diffstat (limited to 'pidl/tests')
-rw-r--r-- | pidl/tests/Util.pm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/pidl/tests/Util.pm b/pidl/tests/Util.pm index 4ad216a6a10..cfc5cf3a99b 100644 --- a/pidl/tests/Util.pm +++ b/pidl/tests/Util.pm @@ -13,6 +13,8 @@ use strict; use FindBin qw($RealBin); use lib "$RealBin/../lib"; +use Parse::Pidl::Samba4 qw(is_intree); + use Parse::Pidl; my $warnings = ""; undef &Parse::Pidl::warning; @@ -66,8 +68,12 @@ sub test_samba4_ndr SKIP: { - skip "no samba environment available, skipping compilation", 3 - if (system("pkg-config --exists ndr") != 0); + my $flags; + if (system("pkg-config --exists ndr") == 0 and !is_intree()) { + $flags = `pkg-config --libs --cflags ndr`; + } else { + skip "no samba environment available, skipping compilation", 3; + } my $main = " #define uint_t unsigned int @@ -134,8 +140,6 @@ $c $cc = "cc"; } - my $flags = `pkg-config --libs --cflags ndr`; - my $cmd = "$cc $cflags -x c - -o $outfile $flags $ldflags"; $cmd =~ s/\n//g; open CC, "|$cmd"; |