svn commit: samba r20967 - in branches/SAMBA_4_0: .
source/pidl/tests source/script/tests source/torture
jelmer at samba.org
jelmer at samba.org
Tue Jan 23 10:08:09 GMT 2007
Author: jelmer
Date: 2007-01-23 10:08:08 +0000 (Tue, 23 Jan 2007)
New Revision: 20967
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=20967
Log:
Allow pidl tests to work with gcov
Modified:
branches/SAMBA_4_0/
branches/SAMBA_4_0/source/pidl/tests/Util.pm
branches/SAMBA_4_0/source/pidl/tests/ndr_align.pl
branches/SAMBA_4_0/source/pidl/tests/ndr_refptr.pl
branches/SAMBA_4_0/source/pidl/tests/ndr_tagtype.pl
branches/SAMBA_4_0/source/script/tests/tests_all.sh
branches/SAMBA_4_0/source/torture/config.mk
Changeset:
Property changes on: branches/SAMBA_4_0
___________________________________________________________________
Name: bzr:merge
- jelmer at samba.org-20060824212938-5923465160f6ab63
jelmer at samba.org-20060830112659-186f132eebc987cc
jelmer at samba.org-20060904121718-63b73248146c14f8
jelmer at samba.org-20060904124721-5e70ab0bd405f748
metze at samba.org-20061010151401-45a5a2ed52cfe172
jelmer at samba.org-20061016130323-400ce51ee51ab30e
jelmer at samba.org-20061016195822-c7783d3ea1a56a53
jelmer at samba.org-20061016230421-75bca2ad62945ede
jelmer at samba.org-20061017145110-8c83a3dd979f6a6a
jelmer at samba.org-20061029173623-eb0459f1d3eb5720
jelmer at samba.org-20070115022006-h5ef1deqflt940b6
jelmer at samba.org-20070116142934-hv99dpwbnq2znh8f
jelmer at samba.org-20070116144126-70rip3bppmvgs3t6
jelmer at samba.org-20070116151516-imvui4r33cj850j9
jelmer at samba.org-20070116154739-3tji4fft7964qgrj
jelmer at samba.org-20070116173900-iasa25stcfty6pbr
jelmer at samba.org-20070117144550-te3o0iy10y14iyo4
jelmer at samba.org-20070122000024-q911packyrjk69ud
jelmer at samba.org-20070122181120-3n8ah238pjbzylyo
jelmer at samba.org-20070122182054-6b26fqrdqyjhyeuc
jelmer at samba.org-20070122233549-k085tfo2o1eqz7mm
jelmer at samba.org-20070123002251-0smz35eva10x84tc
jelmer at samba.org-20070123003546-p0jl6j9tw79q5j1k
jelmer at samba.org-20070123012404-o9w5pmgkm94zsxlu
+ jelmer at samba.org-20060824212938-5923465160f6ab63
jelmer at samba.org-20060830112659-186f132eebc987cc
jelmer at samba.org-20060904121718-63b73248146c14f8
jelmer at samba.org-20060904124721-5e70ab0bd405f748
metze at samba.org-20061010151401-45a5a2ed52cfe172
jelmer at samba.org-20061016130323-400ce51ee51ab30e
jelmer at samba.org-20061016195822-c7783d3ea1a56a53
jelmer at samba.org-20061016230421-75bca2ad62945ede
jelmer at samba.org-20061017145110-8c83a3dd979f6a6a
jelmer at samba.org-20061029173623-eb0459f1d3eb5720
jelmer at samba.org-20070115022006-h5ef1deqflt940b6
jelmer at samba.org-20070116142934-hv99dpwbnq2znh8f
jelmer at samba.org-20070116144126-70rip3bppmvgs3t6
jelmer at samba.org-20070116151516-imvui4r33cj850j9
jelmer at samba.org-20070116154739-3tji4fft7964qgrj
jelmer at samba.org-20070116173900-iasa25stcfty6pbr
jelmer at samba.org-20070117144550-te3o0iy10y14iyo4
jelmer at samba.org-20070122000024-q911packyrjk69ud
jelmer at samba.org-20070122181120-3n8ah238pjbzylyo
jelmer at samba.org-20070122182054-6b26fqrdqyjhyeuc
jelmer at samba.org-20070122233549-k085tfo2o1eqz7mm
jelmer at samba.org-20070123002251-0smz35eva10x84tc
jelmer at samba.org-20070123003546-p0jl6j9tw79q5j1k
jelmer at samba.org-20070123012404-o9w5pmgkm94zsxlu
jelmer at samba.org-20070123094731-ns7dzzzqtb0dlcod
Modified: branches/SAMBA_4_0/source/pidl/tests/Util.pm
===================================================================
--- branches/SAMBA_4_0/source/pidl/tests/Util.pm 2007-01-23 04:12:51 UTC (rev 20966)
+++ branches/SAMBA_4_0/source/pidl/tests/Util.pm 2007-01-23 10:08:08 UTC (rev 20967)
@@ -72,9 +72,27 @@
$outfile = "./test-$name";
}
+ my $cflags = $ENV{CFLAGS};
+ unless (defined($cflags)) {
+ $cflags = "";
+ }
+
+ my $ldflags = $ENV{LDFLAGS};
+ unless (defined($ldflags)) {
+ $ldflags = "";
+ }
+
+ my $cc = $ENV{CC};
+ unless (defined($cc)) {
+ $cc = "cc";
+ }
+
my $flags = `pkg-config --libs --cflags ndr samba-config`;
- open CC, "|cc -x c - -o $outfile $flags";
+ my $cmd = "$cc $cflags -x c - -o $outfile $flags $ldflags";
+ $cmd =~ s/\n//g;
+ print "$cmd\n";
+ open CC, "|$cmd";
print CC "#define uint_t unsigned int\n";
print CC "#define _GNU_SOURCE\n";
print CC "#include <stdint.h>\n";
@@ -121,7 +139,6 @@
is($warnings, $exp);
}
-
sub test_errors($$)
{
my ($exp, $code) = @_;
Modified: branches/SAMBA_4_0/source/pidl/tests/ndr_align.pl
===================================================================
--- branches/SAMBA_4_0/source/pidl/tests/ndr_align.pl 2007-01-23 04:12:51 UTC (rev 20966)
+++ branches/SAMBA_4_0/source/pidl/tests/ndr_align.pl 2007-01-23 10:08:08 UTC (rev 20967)
@@ -16,7 +16,7 @@
} bla;
',
'
- struct ndr_push *ndr = ndr_push_init();
+ struct ndr_push *ndr = ndr_push_init_ctx(NULL);
struct bla r;
uint8_t expected[] = { 0x0D, 0x00, 0xef, 0xbe };
DATA_BLOB expected_blob = { expected, 4 };
@@ -41,7 +41,7 @@
} bla;
',
'
- struct ndr_push *ndr = ndr_push_init();
+ struct ndr_push *ndr = ndr_push_init_ctx(NULL);
struct bla r;
uint8_t expected[] = { 0x0D, 0x00, 0x00, 0x00, 0xef, 0xbe, 0xef, 0xbe };
DATA_BLOB expected_blob = { expected, 8 };
@@ -67,7 +67,7 @@
} bla;
',
'
- struct ndr_push *ndr = ndr_push_init();
+ struct ndr_push *ndr = ndr_push_init_ctx(NULL);
struct bla r;
uint8_t expected[] = { 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xef, 0xbe, 0xef, 0xbe, 0xef, 0xbe, 0xef, 0xbe };
@@ -93,7 +93,7 @@
} bla;
',
'
- struct ndr_push *ndr = ndr_push_init();
+ struct ndr_push *ndr = ndr_push_init_ctx(NULL);
struct bla r;
uint8_t expected[] = { 0x0D, 0xef, 0xbe };
DATA_BLOB expected_blob = { expected, 3 };
@@ -121,7 +121,7 @@
} blie;
',
'
- struct ndr_push *ndr = ndr_push_init();
+ struct ndr_push *ndr = ndr_push_init_ctx(NULL);
struct blie r;
uint8_t data[] = { 0x01, 0x02 };
uint8_t expected[] = { 0x0D, 0x00, 0x0E };
Modified: branches/SAMBA_4_0/source/pidl/tests/ndr_refptr.pl
===================================================================
--- branches/SAMBA_4_0/source/pidl/tests/ndr_refptr.pl 2007-01-23 04:12:51 UTC (rev 20966)
+++ branches/SAMBA_4_0/source/pidl/tests/ndr_refptr.pl 2007-01-23 10:08:08 UTC (rev 20967)
@@ -18,7 +18,7 @@
[public] uint16 echo_TestRef([in] xstruct foo);
',
'
- struct ndr_push *ndr = ndr_push_init();
+ struct ndr_push *ndr = ndr_push_init_ctx(NULL);
uint16_t v = 13;
struct echo_TestRef r;
r.in.foo.x = v;
@@ -48,7 +48,7 @@
',
'
uint16_t v = 13;
- struct ndr_push *ndr = ndr_push_init();
+ struct ndr_push *ndr = ndr_push_init_ctx(NULL);
struct echo_TestRef r;
r.in.foo.x = &v;
@@ -74,7 +74,7 @@
[public] uint16 echo_TestRef([in] xstruct foo);
',
'
- struct ndr_push *ndr = ndr_push_init();
+ struct ndr_push *ndr = ndr_push_init_ctx(NULL);
struct echo_TestRef r;
r.in.foo.x = NULL;
@@ -99,7 +99,7 @@
',
'
uint16_t v = 13;
- struct ndr_push *ndr = ndr_push_init();
+ struct ndr_push *ndr = ndr_push_init_ctx(NULL);
struct echo_TestRef r;
r.in.foo.x = &v;
@@ -126,7 +126,7 @@
[public] uint16 echo_TestRef([in] xstruct foo);
',
'
- struct ndr_push *ndr = ndr_push_init();
+ struct ndr_push *ndr = ndr_push_init_ctx(NULL);
struct echo_TestRef r;
r.in.foo.x = NULL;
@@ -144,7 +144,7 @@
[public] uint16 echo_TestRef([in] xstruct *foo);
',
'
- struct ndr_push *ndr = ndr_push_init();
+ struct ndr_push *ndr = ndr_push_init_ctx(NULL);
struct echo_TestRef r;
struct xstruct s;
s.x = 13;
@@ -169,7 +169,7 @@
[public] uint16 echo_TestRef([in] xstruct *foo);
',
'
- struct ndr_push *ndr = ndr_push_init();
+ struct ndr_push *ndr = ndr_push_init_ctx(NULL);
struct echo_TestRef r;
r.in.foo = NULL;
@@ -189,7 +189,7 @@
[public] uint16 echo_TestRef([in,ref] xstruct *foo);
',
'
- struct ndr_push *ndr = ndr_push_init();
+ struct ndr_push *ndr = ndr_push_init_ctx(NULL);
struct echo_TestRef r;
struct xstruct s;
s.x = 13;
@@ -214,7 +214,7 @@
[public] uint16 echo_TestRef([in,ref] xstruct *foo);
',
'
- struct ndr_push *ndr = ndr_push_init();
+ struct ndr_push *ndr = ndr_push_init_ctx(NULL);
struct echo_TestRef r;
r.in.foo = NULL;
@@ -233,7 +233,7 @@
[public] uint16 echo_TestRef([in,unique] xstruct *foo);
',
'
- struct ndr_push *ndr = ndr_push_init();
+ struct ndr_push *ndr = ndr_push_init_ctx(NULL);
struct echo_TestRef r;
struct xstruct s;
s.x = 13;
@@ -261,7 +261,7 @@
[public] uint16 echo_TestRef([in,unique] xstruct *foo);
',
'
- struct ndr_push *ndr = ndr_push_init();
+ struct ndr_push *ndr = ndr_push_init_ctx(NULL);
struct echo_TestRef r;
r.in.foo = NULL;
@@ -381,7 +381,7 @@
'
[public] void echo_TestRef([in] uint16 **foo);
',
-' struct ndr_push *ndr = ndr_push_init();
+' struct ndr_push *ndr = ndr_push_init_ctx(NULL);
struct echo_TestRef r;
uint16_t v = 13;
uint16_t *pv = &v;
@@ -408,7 +408,7 @@
'
[public] void echo_TestRef([in] uint16 **foo);
',
-' struct ndr_push *ndr = ndr_push_init();
+' struct ndr_push *ndr = ndr_push_init_ctx(NULL);
struct echo_TestRef r;
uint16_t *pv = NULL;
r.in.foo = &pv;
@@ -429,7 +429,7 @@
'
[public] void echo_TestRef([in] uint16 **foo);
',
-' struct ndr_push *ndr = ndr_push_init();
+' struct ndr_push *ndr = ndr_push_init_ctx(NULL);
struct echo_TestRef r;
r.in.foo = NULL;
@@ -445,7 +445,7 @@
'
[public] void echo_TestRef([in,ref] uint16 **foo);
',
-' struct ndr_push *ndr = ndr_push_init();
+' struct ndr_push *ndr = ndr_push_init_ctx(NULL);
struct echo_TestRef r;
uint16_t v = 13;
uint16_t *pv = &v;
@@ -473,7 +473,7 @@
'
[public] void echo_TestRef([in,ref] uint16 **foo);
',
-' struct ndr_push *ndr = ndr_push_init();
+' struct ndr_push *ndr = ndr_push_init_ctx(NULL);
struct echo_TestRef r;
uint16_t *pv = NULL;
r.in.foo = &pv;
@@ -494,7 +494,7 @@
'
[public] void echo_TestRef([in,ref] uint16 **foo);
',
-' struct ndr_push *ndr = ndr_push_init();
+' struct ndr_push *ndr = ndr_push_init_ctx(NULL);
struct echo_TestRef r;
r.in.foo = NULL;
@@ -511,7 +511,7 @@
'
[public] void echo_TestRef([in,ignore] uint16 *foo, [in] uint16 *bar);
',
-' struct ndr_push *ndr = ndr_push_init();
+' struct ndr_push *ndr = ndr_push_init_ctx(NULL);
struct echo_TestRef r;
uint16_t v = 10;
r.in.foo = &v;
Modified: branches/SAMBA_4_0/source/pidl/tests/ndr_tagtype.pl
===================================================================
--- branches/SAMBA_4_0/source/pidl/tests/ndr_tagtype.pl 2007-01-23 04:12:51 UTC (rev 20966)
+++ branches/SAMBA_4_0/source/pidl/tests/ndr_tagtype.pl 2007-01-23 10:08:08 UTC (rev 20967)
@@ -18,7 +18,7 @@
};
',
'
- struct ndr_push *ndr = ndr_push_init();
+ struct ndr_push *ndr = ndr_push_init_ctx(NULL);
struct bla r;
uint8_t expected[] = { 0x0D };
DATA_BLOB expected_blob = { expected, 1 };
Modified: branches/SAMBA_4_0/source/script/tests/tests_all.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/tests_all.sh 2007-01-23 04:12:51 UTC (rev 20966)
+++ branches/SAMBA_4_0/source/script/tests/tests_all.sh 2007-01-23 10:08:08 UTC (rev 20967)
@@ -1,4 +1,5 @@
#!/bin/sh
+ $SRCDIR/script/tests/test_pidl.sh
$SRCDIR/script/tests/test_ejs.sh $DOMAIN $USERNAME $PASSWORD
$SRCDIR/script/tests/test_ldap.sh $SERVER $USERNAME $PASSWORD
$SRCDIR/script/tests/test_nbt.sh $SERVER
@@ -11,5 +12,4 @@
$SRCDIR/script/tests/test_posix.sh //$SERVER/tmp $USERNAME $PASSWORD ""
$SRCDIR/script/tests/test_local.sh
$SRCDIR/script/tests/test_blackbox.sh $SERVER $USERNAME $PASSWORD $DOMAIN $PREFIX
- $SRCDIR/script/tests/test_pidl.sh
$SRCDIR/script/tests/test_simple.sh //$SERVER/simple $USERNAME $PASSWORD ""
Modified: branches/SAMBA_4_0/source/torture/config.mk
===================================================================
--- branches/SAMBA_4_0/source/torture/config.mk 2007-01-23 04:12:51 UTC (rev 20966)
+++ branches/SAMBA_4_0/source/torture/config.mk 2007-01-23 10:08:08 UTC (rev 20967)
@@ -340,7 +340,8 @@
@$(MAKE) test \
HOSTCC_CFLAGS="$(HOSTCC_CFLAGS) $(GCOV_FLAGS)" \
CFLAGS="$(CFLAGS) $(GCOV_FLAGS)" \
- LDFLAGS="$(LDFLAGS) $(GCOV_FLAGS) $(GCOV_LIBS)"
+ LDFLAGS="$(LDFLAGS) $(GCOV_FLAGS) $(GCOV_LIBS)" \
+ SHLD_FLAGS="$(SHLD_FLAGS) $(GCOV_FLAGS) $(GCOV_LIBS)"
gcov: test_cov
for I in $(sort $(dir $(ALL_OBJS))); \
More information about the samba-cvs
mailing list