r8265: Fixes to the pidl test suite.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 9 Jul 2005 15:56:17 +0000 (15:56 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:19:28 +0000 (13:19 -0500)
(This used to be commit 1235333afbfab643ea35e9b43f6142da3f6a41d7)

source4/build/pidl/Makefile.PL
source4/build/pidl/Parse/Pidl/Test.pm
source4/build/pidl/tests/ndr_align.pl
source4/build/pidl/tests/ndr_alloc.pl
source4/build/pidl/tests/ndr_array.pl
source4/build/pidl/tests/ndr_refptr.pl
source4/build/pidl/tests/ndr_simple.pl
source4/build/pidl/tests/ndr_string.pl

index 1c08f9f9b84133a9b2b732067212ce600d31d6eb..ae862bfdb59aa6a825eea7a719ff494cfbddcf2e 100755 (executable)
@@ -5,6 +5,7 @@ WriteMakefile(
        'EXE_FILES' => [ 'pidl' ],
        'PMLIBDIRS' => [ 'Parse' ],
        'C' => [],
+       'test' => { 'TESTS' => 'tests/*.pl' }
 );
 
 sub MY::postamble {
index 88403f31d47e701a288b1585fcbc64c65e8016a1..34ea80c95cd02d4b522b99c5cf30408c4e4e3d26 100644 (file)
@@ -5,7 +5,7 @@
 package Parse::Pidl::Test;
 
 use strict;
-use pidl::util;
+use Parse::Pidl::Util;
 use Getopt::Long;
 
 my $cc = $ENV{CC};
@@ -146,7 +146,7 @@ sub GetSettings($)
 {
        my $settings = { 
                OutputDir => ".",
-               'IDL-Compiler' => "./build/pidl/pidl.pl"
+               'IDL-Compiler' => "./pidl"
        };
 
        my %opts = ();
index 2cd4bde18572cd41c056c1fd8e5ca6d944431dd4..da994224eb981c35fe75fbb250b39bbb94e0939b 100755 (executable)
@@ -3,17 +3,15 @@
 # (C) 2005 Jelmer Vernooij. Published under the GNU GPL
 use strict;
 
-use FindBin qw($RealBin);
-use lib "$RealBin/../..";
-use pidl::test;
+use Parse::Pidl::Test;
 
-my %settings = Test::GetSettings(@ARGV);
+my %settings = Parse::Pidl::Test::GetSettings(@ARGV);
 
 $settings{'IDL-Arguments'} = ['--quiet', '--parse', '--parser=ndr_test.c', '--header=ndr_test.h'];
 $settings{'IncludeFiles'} = ['ndr_test.h'];
 $settings{'ExtraFiles'} = ['ndr_test.c'];
 
-Test::test_idl('align-uint8-uint16', \%settings,
+Parse::Pidl::Test::test_idl('align-uint8-uint16', \%settings,
 '
        typedef [public] struct { 
                uint8 x;
@@ -38,7 +36,7 @@ Test::test_idl('align-uint8-uint16', \%settings,
                return 2;
 ');
 
-Test::test_idl('align-uint8-uint32', \%settings,
+Parse::Pidl::Test::test_idl('align-uint8-uint32', \%settings,
 '
        typedef [public] struct { 
                uint8 x;
@@ -64,7 +62,7 @@ Test::test_idl('align-uint8-uint32', \%settings,
 ');
 
 
-Test::test_idl('align-uint8-hyper', \%settings,
+Parse::Pidl::Test::test_idl('align-uint8-hyper', \%settings,
 '
        typedef [public] struct { 
                uint8 x;
@@ -90,7 +88,7 @@ Test::test_idl('align-uint8-hyper', \%settings,
                return 2;
 ');
 
-Test::test_idl('noalignflag-uint8-uint16', \%settings,
+Parse::Pidl::Test::test_idl('noalignflag-uint8-uint16', \%settings,
 '
        typedef [public] struct { 
                uint8 x;
@@ -117,7 +115,7 @@ Test::test_idl('noalignflag-uint8-uint16', \%settings,
                return 2;
 ');
 
-Test::test_idl('align-blob-align2', \%settings,
+Parse::Pidl::Test::test_idl('align-blob-align2', \%settings,
 '
        typedef [public] struct { 
                uint8 x;
index f0f366a947b692c388d84dd820df714eed3a063a..4f6eddbfb904f57d5fdb317cc07e54e14c4bf116 100755 (executable)
@@ -3,18 +3,16 @@
 # (C) 2005 Jelmer Vernooij. Published under the GNU GPL
 use strict;
 
-use FindBin qw($RealBin);
-use lib "$RealBin/../..";
-use pidl::test;
+use Parse::Pidl::Test;
 
-my %settings = Test::GetSettings(@ARGV);
+my %settings = Parse::Pidl::Test::GetSettings(@ARGV);
 $settings{'IDL-Arguments'} = ['--quiet', '--parse', '--parser=ndr_test.c', '--header=ndr_test.h'];
 $settings{'IncludeFiles'} = ['ndr_test.h'];
 $settings{'ExtraFiles'} = ['ndr_test.c'];
 
 # Check that an outgoing scalar pointer is allocated correctly
 
-Test::test_idl("alloc-scalar", \%settings, 
+Parse::Pidl::Test::test_idl("alloc-scalar", \%settings, 
 '      
        typedef struct {
                uint8 *x;
@@ -39,7 +37,7 @@ Test::test_idl("alloc-scalar", \%settings,
 );
 
 # Check that an outgoing buffer pointer is allocated correctly
-Test::test_idl("alloc-buffer", \%settings, 
+Parse::Pidl::Test::test_idl("alloc-buffer", \%settings, 
 '      
        typedef struct {
                uint8 data;
@@ -68,7 +66,7 @@ Test::test_idl("alloc-buffer", \%settings,
 );
 
 # Check that ref pointers aren't allocated by default
-Test::test_idl("ref-noalloc-null", \%settings, 
+Parse::Pidl::Test::test_idl("ref-noalloc-null", \%settings, 
 '      
        [public] void TestAlloc([in,ref] uint8 *t);
 ','
@@ -84,7 +82,7 @@ Test::test_idl("ref-noalloc-null", \%settings,
 );
 
 # Check that ref pointers aren't allocated by default
-Test::test_idl("ref-noalloc", \%settings, 
+Parse::Pidl::Test::test_idl("ref-noalloc", \%settings, 
 '      
        [public] void TestAlloc([in,ref] uint8 *t);
 ','
@@ -104,7 +102,7 @@ Test::test_idl("ref-noalloc", \%settings,
 );
 
 # Check that an outgoing ref pointer is allocated correctly
-Test::test_idl("ref-alloc", \%settings, 
+Parse::Pidl::Test::test_idl("ref-alloc", \%settings, 
 '      
        [public] void TestAlloc([in,ref] uint8 *t);
 ','
index 3012868315178c900408183a2b8298c7944a2947..d486308339d9bf975f15c9caaa6814dc8b21f494 100755 (executable)
@@ -4,16 +4,14 @@
 # Published under the GNU General Public License
 use strict;
 
-use FindBin qw($RealBin);
-use lib "$RealBin/../..";
-use pidl::test;
+use Parse::Pidl::Test;
 
-my %settings = Test::GetSettings(@ARGV);
+my %settings = Parse::Pidl::Test::GetSettings(@ARGV);
 $settings{'IDL-Arguments'} = ['--quiet', '--parse', '--parser=ndr_test.c', '--header=ndr_test.h'];
 $settings{'IncludeFiles'} = ['ndr_test.h'];
 $settings{'ExtraFiles'} = ['ndr_test.c'];
 
-Test::test_idl(
+Parse::Pidl::Test::test_idl(
        # Name
        'Fixed-Array',
        
index e8d434756ee1a5c5c316e8b24155a76d50da3d28..8344661ad3d8aac5358f0e83e7dd064ba4348adc 100755 (executable)
@@ -5,16 +5,14 @@
 # Published under the GNU General Public License.
 use strict;
 
-use FindBin qw($RealBin);
-use lib "$RealBin/../..";
-use pidl::test;
+use Parse::Pidl::Test;
 
-my %settings = Test::GetSettings(@ARGV);
+my %settings = Parse::Pidl::Test::GetSettings(@ARGV);
 $settings{'IDL-Arguments'} = ['--quiet', '--parse', '--parser=ndr_test.c', '--header=ndr_test.h'];
 $settings{'IncludeFiles'} = ['ndr_test.h'];
 $settings{'ExtraFiles'} = ['ndr_test.c'];
 
-Test::test_idl("noptr-push", \%settings, 
+Parse::Pidl::Test::test_idl("noptr-push", \%settings, 
 '      typedef struct {
                uint16 x;
        } xstruct;
@@ -43,7 +41,7 @@ Test::test_idl("noptr-push", \%settings,
        }
 ');
 
-Test::test_idl("ptr-embedded-push", \%settings,
+Parse::Pidl::Test::test_idl("ptr-embedded-push", \%settings,
 '   typedef struct {
                uint16 *x;
        } xstruct;
@@ -70,7 +68,7 @@ Test::test_idl("ptr-embedded-push", \%settings,
                return 4;
 ');
 
-Test::test_idl("ptr-embedded-push-null", \%settings,
+Parse::Pidl::Test::test_idl("ptr-embedded-push-null", \%settings,
 '   typedef struct {
                uint16 *x;
        } xstruct;
@@ -93,7 +91,7 @@ Test::test_idl("ptr-embedded-push-null", \%settings,
                return 3;
 ');
 
-Test::test_idl("refptr-embedded-push", \%settings,
+Parse::Pidl::Test::test_idl("refptr-embedded-push", \%settings,
 '
        typedef struct {
                [ref] uint16 *x;
@@ -121,7 +119,7 @@ Test::test_idl("refptr-embedded-push", \%settings,
                return 4;
 ');
 
-Test::test_idl("refptr-embedded-push-null", \%settings,
+Parse::Pidl::Test::test_idl("refptr-embedded-push-null", \%settings,
 '
        typedef struct {
                [ref] uint16 *x;
@@ -139,7 +137,7 @@ Test::test_idl("refptr-embedded-push-null", \%settings,
        /* Windows gives [client runtime error 0x6f4] */
 ');
 
-Test::test_idl("ptr-top-push", \%settings,
+Parse::Pidl::Test::test_idl("ptr-top-push", \%settings,
 '
        typedef struct {
                uint16 x;
@@ -164,7 +162,7 @@ Test::test_idl("ptr-top-push", \%settings,
                return 3;
 ');
 
-Test::test_idl("ptr-top-push-null", \%settings,
+Parse::Pidl::Test::test_idl("ptr-top-push-null", \%settings,
 '
        typedef struct {
                uint16 x;
@@ -184,7 +182,7 @@ Test::test_idl("ptr-top-push-null", \%settings,
 ');
 
 
-Test::test_idl("refptr-top-push", \%settings,
+Parse::Pidl::Test::test_idl("refptr-top-push", \%settings,
 '
        typedef struct {
                uint16 x;
@@ -209,7 +207,7 @@ Test::test_idl("refptr-top-push", \%settings,
                return 3;
 ');
 
-Test::test_idl("refptr-top-push-null", \%settings,
+Parse::Pidl::Test::test_idl("refptr-top-push-null", \%settings,
 '
        typedef struct {
                uint16 x;
@@ -229,7 +227,7 @@ Test::test_idl("refptr-top-push-null", \%settings,
 ');
 
 
-Test::test_idl("uniqueptr-top-push", \%settings,
+Parse::Pidl::Test::test_idl("uniqueptr-top-push", \%settings,
 '      typedef struct {
                uint16 x;
        } xstruct;
@@ -257,7 +255,7 @@ Test::test_idl("uniqueptr-top-push", \%settings,
                return 4;
 ');
 
-Test::test_idl("uniqueptr-top-push-null", \%settings,
+Parse::Pidl::Test::test_idl("uniqueptr-top-push-null", \%settings,
 '      typedef struct {
                uint16 x;
        } xstruct;
@@ -281,7 +279,7 @@ Test::test_idl("uniqueptr-top-push-null", \%settings,
 ');
 
 
-Test::test_idl("ptr-top-out-pull", \%settings,
+Parse::Pidl::Test::test_idl("ptr-top-out-pull", \%settings,
 '
        typedef struct {
                uint16 x;
@@ -308,7 +306,7 @@ Test::test_idl("ptr-top-out-pull", \%settings,
                return 3;
 ');    
 
-Test::test_idl("ptr-top-out-pull-null", \%settings,
+Parse::Pidl::Test::test_idl("ptr-top-out-pull-null", \%settings,
 '
        typedef struct {
                uint16 x;
@@ -331,7 +329,7 @@ Test::test_idl("ptr-top-out-pull-null", \%settings,
 ');
 
 
-Test::test_idl("refptr-top-out-pull", \%settings,
+Parse::Pidl::Test::test_idl("refptr-top-out-pull", \%settings,
 '
        typedef struct {
                uint16 x;
@@ -358,7 +356,7 @@ Test::test_idl("refptr-top-out-pull", \%settings,
                return 3;
 ');    
 
-Test::test_idl("refptr-top-out-pull-null", \%settings,
+Parse::Pidl::Test::test_idl("refptr-top-out-pull-null", \%settings,
 '
        typedef struct {
                uint16 x;
@@ -381,7 +379,7 @@ Test::test_idl("refptr-top-out-pull-null", \%settings,
 ');
 
 
-Test::test_idl("ptr-top-push-double", \%settings,
+Parse::Pidl::Test::test_idl("ptr-top-push-double", \%settings,
 '
        [public] void echo_TestRef([in] uint16 **foo);
 ',
@@ -405,7 +403,7 @@ Test::test_idl("ptr-top-push-double", \%settings,
                return 4;
 ');
 
-Test::test_idl("ptr-top-push-double-sndnull", \%settings,
+Parse::Pidl::Test::test_idl("ptr-top-push-double-sndnull", \%settings,
 '
        [public] void echo_TestRef([in] uint16 **foo);
 ',
@@ -425,7 +423,7 @@ Test::test_idl("ptr-top-push-double-sndnull", \%settings,
                return 3;
 ');
 
-Test::test_idl("ptr-top-push-double-fstnull", \%settings,
+Parse::Pidl::Test::test_idl("ptr-top-push-double-fstnull", \%settings,
 '
        [public] void echo_TestRef([in] uint16 **foo);
 ',
@@ -441,7 +439,7 @@ Test::test_idl("ptr-top-push-double-fstnull", \%settings,
 ');
 
 
-Test::test_idl("refptr-top-push-double", \%settings,
+Parse::Pidl::Test::test_idl("refptr-top-push-double", \%settings,
 '
        [public] void echo_TestRef([in,ref] uint16 **foo);
 ',
@@ -465,7 +463,7 @@ Test::test_idl("refptr-top-push-double", \%settings,
                return 4;
 ');
 
-Test::test_idl("refptr-top-push-double-sndnull", \%settings,
+Parse::Pidl::Test::test_idl("refptr-top-push-double-sndnull", \%settings,
 '
        [public] void echo_TestRef([in,ref] uint16 **foo);
 ',
@@ -485,7 +483,7 @@ Test::test_idl("refptr-top-push-double-sndnull", \%settings,
                return 3;
 ');
 
-Test::test_idl("refptr-top-push-double-fstnull", \%settings,
+Parse::Pidl::Test::test_idl("refptr-top-push-double-fstnull", \%settings,
 '
        [public] void echo_TestRef([in,ref] uint16 **foo);
 ',
@@ -500,7 +498,7 @@ Test::test_idl("refptr-top-push-double-fstnull", \%settings,
 
 ');
 
-Test::test_idl("ignore-ptr", \%settings,
+Parse::Pidl::Test::test_idl("ignore-ptr", \%settings,
 '
        [public] void echo_TestRef([in,ignore] uint16 *foo, [in] uint16 *bar);
 ',
index b1930c45b674665548c0613843307ec9b5194b86..7d48c9f4d7149d138f42cb03ddf48082adb12103 100755 (executable)
@@ -4,16 +4,14 @@
 # Published under the GNU General Public License
 use strict;
 
-use FindBin qw($RealBin);
-use lib "$RealBin/../..";
-use pidl::test;
+use Parse::Pidl::Test;
 
-my %settings = Test::GetSettings(@ARGV);
+my %settings = Parse::Pidl::Test::GetSettings(@ARGV);
 $settings{'IDL-Arguments'} = ['--quiet', '--parse', '--parser=ndr_test.c', '--header=ndr_test.h'];
 $settings{'IncludeFiles'} = ['ndr_test.h'];
 $settings{'ExtraFiles'} = ['ndr_test.c'];
 
-Test::test_idl(
+Parse::Pidl::Test::test_idl(
        # Name
        'UInt8',
        
index c011a290286413a3659ff2829410ae5b4ea25036..ad8db912d74c5bcdf4d5befb5e6e7620d24c7b94 100755 (executable)
@@ -4,17 +4,15 @@
 # Published under the GNU General Public License
 use strict;
 
-use FindBin qw($RealBin);
-use lib "$RealBin/../..";
-use pidl::test;
+use Parse::Pidl::Test;
 
-my %settings = Test::GetSettings(@ARGV);
+my %settings = Parse::Pidl::Test::GetSettings(@ARGV);
 
 $settings{'IDL-Arguments'} = ['--quiet', '--parse', '--parser=ndr_test.c', '--header=ndr_test.h'];
 $settings{'IncludeFiles'} = ['ndr_test.h'];
 $settings{'ExtraFiles'} = ['ndr_test.c'];
 
-Test::test_idl("string-pull-empty", \%settings,
+Parse::Pidl::Test::test_idl("string-pull-empty", \%settings,
 ' [public] void TestString([in,flag(STR_ASCII|LIBNDR_FLAG_STR_SIZE4)] string data);',
 '
        uint8_t data[] = { 0x00, 0x00, 0x00, 0x00 };
@@ -33,7 +31,7 @@ Test::test_idl("string-pull-empty", \%settings,
                return 3;
 ');
 
-Test::test_idl("string-ascii-pull", \%settings,
+Parse::Pidl::Test::test_idl("string-ascii-pull", \%settings,
 '
        [public] void TestString([in,flag(STR_ASCII|LIBNDR_FLAG_STR_SIZE4)] string data);
 ',