summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-03-21 15:57:07 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:49:37 -0500
commit2fca3f9082a70e1f153f6c9f195d95b0d48e363d (patch)
tree57146b03e224aede0bd6495beb3d5d717d424930 /source4/torture
parente2f26316cdeba1875be2cd583870ac6127c2be56 (diff)
downloadsamba-2fca3f9082a70e1f153f6c9f195d95b0d48e363d.tar.gz
samba-2fca3f9082a70e1f153f6c9f195d95b0d48e363d.tar.bz2
samba-2fca3f9082a70e1f153f6c9f195d95b0d48e363d.zip
r21909: Merge some of my recent improvements to the test infrastructure:
- Allow tests to specify what environment they need to run in (dc and none are thecurrent supported ones). - Move more Samba4-specific code out of the common code (This used to be commit dbe9de10287c902f4a5ea5d431dea4a79f9b170b)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/config.mk17
-rw-r--r--source4/torture/local/torture.c2
2 files changed, 16 insertions, 3 deletions
diff --git a/source4/torture/config.mk b/source4/torture/config.mk
index 9ba48c0c8c..640e79cd95 100644
--- a/source4/torture/config.mk
+++ b/source4/torture/config.mk
@@ -365,8 +365,10 @@ MANPAGE = man/locktest.1
GCOV_FLAGS = -ftest-coverage -fprofile-arcs
GCOV_LIBS = -lgcov
+COV_TARGET = test
+
test_cov:
- @$(MAKE) test \
+ @$(MAKE) $(COV_TARGET) \
HOSTCC_CFLAGS="$(HOSTCC_CFLAGS) $(GCOV_FLAGS)" \
CFLAGS="$(CFLAGS) $(GCOV_FLAGS)" \
LDFLAGS="$(LDFLAGS) $(GCOV_FLAGS) $(GCOV_LIBS)" \
@@ -377,8 +379,19 @@ gcov: test_cov
do $(GCOV) -p -o $$I $$I/*.c; \
done
+lcov-split:
+ rm -f samba.info
+ @$(MAKE) $(COV_TARGET) \
+ HOSTCC_CFLAGS="$(HOSTCC_CFLAGS) $(GCOV_FLAGS)" \
+ CFLAGS="$(CFLAGS) $(GCOV_FLAGS)" \
+ LDFLAGS="$(LDFLAGS) $(GCOV_FLAGS) $(GCOV_LIBS)" \
+ SHLD_FLAGS="$(SHLD_FLAGS) $(GCOV_FLAGS) $(GCOV_LIBS)" \
+ TEST_OPTIONS="--analyse-cmd=\"lcov --base-directory `pwd` --directory . --capture --output-file samba.info -t\""
+ -rm heimdal/lib/*/{lex,parse}.{gcda,gcno}
+ genhtml -o coverage samba.info
+
lcov: test_cov
- rm heimdal/lib/*/{lex,parse}.{gcda,gcno}
+ -rm heimdal/lib/*/{lex,parse}.{gcda,gcno}
lcov --base-directory `pwd` --directory . --capture --output-file samba.info
genhtml -o coverage samba.info
diff --git a/source4/torture/local/torture.c b/source4/torture/local/torture.c
index 4a5bc99d35..653049f351 100644
--- a/source4/torture/local/torture.c
+++ b/source4/torture/local/torture.c
@@ -47,7 +47,7 @@ static bool test_setup_server(struct torture_context *tctx)
torture_assert_ntstatus_ok(tctx, torture_setup_server(mem_ctx,
"setupserver-success",
- "./script/tests/mktestsetup.sh",
+ "./script/tests/mktestdc.sh",
"./bin/smbd", &pid),
"starting smbd failed");