summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsource4/build/pidl/Makefile.PL1
-rw-r--r--source4/build/pidl/Parse/Pidl/Test.pm4
-rwxr-xr-xsource4/build/pidl/tests/ndr_align.pl16
-rwxr-xr-xsource4/build/pidl/tests/ndr_alloc.pl16
-rwxr-xr-xsource4/build/pidl/tests/ndr_array.pl8
-rwxr-xr-xsource4/build/pidl/tests/ndr_refptr.pl50
-rwxr-xr-xsource4/build/pidl/tests/ndr_simple.pl8
-rwxr-xr-xsource4/build/pidl/tests/ndr_string.pl10
8 files changed, 51 insertions, 62 deletions
diff --git a/source4/build/pidl/Makefile.PL b/source4/build/pidl/Makefile.PL
index 1c08f9f9b8..ae862bfdb5 100755
--- a/source4/build/pidl/Makefile.PL
+++ b/source4/build/pidl/Makefile.PL
@@ -5,6 +5,7 @@ WriteMakefile(
'EXE_FILES' => [ 'pidl' ],
'PMLIBDIRS' => [ 'Parse' ],
'C' => [],
+ 'test' => { 'TESTS' => 'tests/*.pl' }
);
sub MY::postamble {
diff --git a/source4/build/pidl/Parse/Pidl/Test.pm b/source4/build/pidl/Parse/Pidl/Test.pm
index 88403f31d4..34ea80c95c 100644
--- a/source4/build/pidl/Parse/Pidl/Test.pm
+++ b/source4/build/pidl/Parse/Pidl/Test.pm
@@ -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 = ();
diff --git a/source4/build/pidl/tests/ndr_align.pl b/source4/build/pidl/tests/ndr_align.pl
index 2cd4bde185..da994224eb 100755
--- a/source4/build/pidl/tests/ndr_align.pl
+++ b/source4/build/pidl/tests/ndr_align.pl
@@ -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;
diff --git a/source4/build/pidl/tests/ndr_alloc.pl b/source4/build/pidl/tests/ndr_alloc.pl
index f0f366a947..4f6eddbfb9 100755
--- a/source4/build/pidl/tests/ndr_alloc.pl
+++ b/source4/build/pidl/tests/ndr_alloc.pl
@@ -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);
','
diff --git a/source4/build/pidl/tests/ndr_array.pl b/source4/build/pidl/tests/ndr_array.pl
index 3012868315..d486308339 100755
--- a/source4/build/pidl/tests/ndr_array.pl
+++ b/source4/build/pidl/tests/ndr_array.pl
@@ -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',
diff --git a/source4/build/pidl/tests/ndr_refptr.pl b/source4/build/pidl/tests/ndr_refptr.pl
index e8d434756e..8344661ad3 100755
--- a/source4/build/pidl/tests/ndr_refptr.pl
+++ b/source4/build/pidl/tests/ndr_refptr.pl
@@ -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);
',
diff --git a/source4/build/pidl/tests/ndr_simple.pl b/source4/build/pidl/tests/ndr_simple.pl
index b1930c45b6..7d48c9f4d7 100755
--- a/source4/build/pidl/tests/ndr_simple.pl
+++ b/source4/build/pidl/tests/ndr_simple.pl
@@ -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',
diff --git a/source4/build/pidl/tests/ndr_string.pl b/source4/build/pidl/tests/ndr_string.pl
index c011a29028..ad8db912d7 100755
--- a/source4/build/pidl/tests/ndr_string.pl
+++ b/source4/build/pidl/tests/ndr_string.pl
@@ -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);
',