Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 796fc4c8 authored by Ivan Lozano's avatar Ivan Lozano
Browse files

[Rust] Correct the gcov path prefix.

strings.TrimPrefix() args are reversed, leading to an incorrect gcov
path prefix for Rust coverage.

Bug: 156482307
Test: built and ran unicode-xid_device_tests_unicode_xid with coverage
Change-Id: I6476cee14093a7e53738019c84dbcf4333b0b9b2
parent 2752d926
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -163,7 +163,7 @@ func transformSrctoCrate(ctx android.ModuleContext, main android.Path, deps Path
	if flags.Coverage {
		var gcnoFile android.WritablePath
		// Provide consistency with cc gcda output, see cc/builder.go init()
		profileEmitArg := strings.TrimPrefix("PWD=", cc.PwdPrefix()) + "/"
		profileEmitArg := strings.TrimPrefix(cc.PwdPrefix(), "PWD=") + "/"

		if outputFile.Ext() != "" {
			gcnoFile = android.PathForModuleOut(ctx, pathtools.ReplaceExtension(outputFile.Base(), "gcno"))