r12776: use $ENV{TEST_DATA_PREFIX} for test files if available
authorStefan Metzmacher <metze@samba.org>
Sun, 8 Jan 2006 20:20:18 +0000 (20:20 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:49:53 +0000 (13:49 -0500)
metze
(This used to be commit 5552eaa37c228872736688bb65b4f678bdfeddf4)

source4/pidl/tests/Util.pm

index c85ef72d0ab6cddf7786228cc7c6c48b5c25692f..cd2ba2a37ec29b7f20c0a20573acc1a25b15d1a0 100644 (file)
@@ -25,7 +25,7 @@ sub test_samba4_ndr($$$)
        my ($name,$idl,$c) = @_;
        my $pidl = Parse::Pidl::IDL::parse_string("interface echo { $idl }; ", "<$name>");
        
-       ok (defined($pidl), "($name) parse idl");
+       ok(defined($pidl), "($name) parse idl");
        my $header = Parse::Pidl::Samba4::Header::Parse($pidl);
        ok(defined($header), "($name) generate generic header");
        my $pndr = Parse::Pidl::NDR::Parse($pidl);
@@ -45,7 +45,14 @@ SKIP: {
        skip "no sane C compiler, skipping compilation", 3
                if not $sanecc;
 
-       my $outfile = "test-$name";
+       my $test_data_prefix = $ENV{TEST_DATA_PREFIX};
+
+       my $outfile;
+       if (defined($test_data_prefix)) {
+               $outfile = "$test_data_prefix/test-$name";      
+       } else {
+               $outfile = "test-$name";
+       }
 
        #my $cflags = $ENV{CFLAGS};
        my $cflags = "-Iinclude -Ilib -I.";