Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 789f02e

Browse files
committed
Merge pull request #1225 from MartinNowak/fix14464
fix Issue 14464 - coverage merge doesn't work
2 parents 19f3f0d + 0db36e8 commit 789f02e

File tree

10 files changed

+249
-134
lines changed

10 files changed

+249
-134
lines changed

posix.mak

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ $(DRUNTIME): $(OBJS) $(SRCS)
193193
UT_MODULES:=$(patsubst src/%.d,$(OBJDIR)/%,$(SRCS))
194194
HAS_ADDITIONAL_TESTS:=$(shell test -d test && echo 1)
195195
ifeq ($(HAS_ADDITIONAL_TESTS),1)
196-
ADDITIONAL_TESTS:=test/init_fini test/exceptions
196+
ADDITIONAL_TESTS:=test/init_fini test/exceptions test/coverage
197197
ADDITIONAL_TESTS+=$(if $(SHARED),test/shared,)
198198
endif
199199

src/core/runtime.d

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,12 +314,37 @@ struct Runtime
314314

315315

316316
private:
317+
317318
// NOTE: This field will only ever be set in a static ctor and should
318319
// never occur within any but the main thread, so it is safe to
319320
// make it __gshared.
320321
__gshared ModuleUnitTester sm_moduleUnitTester = null;
321322
}
322323

324+
/**
325+
* Set source file path for coverage reports.
326+
*
327+
* Params:
328+
* path = The new path name.
329+
*/
330+
extern (C) void dmd_coverSourcePath(string path);
331+
332+
/**
333+
* Set output path for coverage reports.
334+
*
335+
* Params:
336+
* path = The new path name.
337+
*/
338+
extern (C) void dmd_coverDestPath(string path);
339+
340+
/**
341+
* Enable merging of coverage reports with existing data.
342+
*
343+
* Params:
344+
* merge = enable/disable coverage merge mode
345+
*/
346+
extern (C) void dmd_coverSetMerge(bool flag);
347+
323348
///////////////////////////////////////////////////////////////////////////////
324349
// Overridable Callbacks
325350
///////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)