-
Notifications
You must be signed in to change notification settings - Fork 281
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix source pathing for code coverage (#1006)
* Fix source pathing for code coverage * lint fixes hopefully? * lint? idk what's going on here * Rename in_out_pair to records * Remove bad assumptions about how bazel works * Clean up lingering srcs Clean up lingering srcs * this commit should fail tests * this commit should pass tests * let this test actually fail the CI * update comments * Refactor src_paths * spelling is hard
- Loading branch information
David Haxton
authored
Feb 25, 2020
1 parent
0366fb2
commit 926aaca
Showing
11 changed files
with
128 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
package coverage; | ||
|
||
object A1 { | ||
def a1(flag: Boolean): B1.type = | ||
if (flag) B1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
package coverage; | ||
|
||
object A2 { | ||
def a2(): Unit = { | ||
println("a2: " + | ||
"" // B2.b2_a() | ||
println("a2: " + B2.b2_a() | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
package coverage; | ||
|
||
object B1 { | ||
|
||
def not_called(): Unit = { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
package coverage; | ||
|
||
class B2 { | ||
public static String b2_a() { | ||
return C2.c2("hello from b2_a"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
package coverage; | ||
|
||
object C2 { | ||
def c2(input: String): String = | ||
input.reverse | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
package coverage; | ||
import org.scalatest._ | ||
|
||
class TestAll extends FlatSpec { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
package coverage; | ||
|
||
import org.junit.Test; | ||
import org.junit.Assert.*; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,110 @@ | ||
SF:/A1.scala | ||
FN:-1,A1$::<clinit> ()V | ||
FN:5,A1$::<init> ()V | ||
FN:3,A1$::a1 (Z)LB1$; | ||
FN:-1,A1::a1 (Z)LB1$; | ||
FNDA:1,A1$::<clinit> ()V | ||
FNDA:1,A1$::<init> ()V | ||
FNDA:1,A1$::a1 (Z)LB1$; | ||
FNDA:0,A1::a1 (Z)LB1$; | ||
SF:test/coverage/A1.scala | ||
FN:-1,coverage/A1$::<clinit> ()V | ||
FN:7,coverage/A1$::<init> ()V | ||
FN:5,coverage/A1$::a1 (Z)Lcoverage/B1$; | ||
FN:-1,coverage/A1::a1 (Z)Lcoverage/B1$; | ||
FNDA:1,coverage/A1$::<clinit> ()V | ||
FNDA:1,coverage/A1$::<init> ()V | ||
FNDA:1,coverage/A1$::a1 (Z)Lcoverage/B1$; | ||
FNDA:0,coverage/A1::a1 (Z)Lcoverage/B1$; | ||
FNF:4 | ||
FNH:3 | ||
BA:3,2 | ||
BA:5,2 | ||
BRF:1 | ||
BRH:1 | ||
DA:3,4 | ||
DA:4,0 | ||
DA:5,5 | ||
DA:5,4 | ||
DA:6,0 | ||
DA:7,5 | ||
LH:2 | ||
LF:3 | ||
end_of_record | ||
SF:/A2.scala | ||
FN:-1,A2$::<clinit> ()V | ||
FN:7,A2$::<init> ()V | ||
FN:3,A2$::a2 ()V | ||
FN:-1,A2::a2 ()V | ||
FNDA:1,A2$::<clinit> ()V | ||
FNDA:1,A2$::<init> ()V | ||
FNDA:1,A2$::a2 ()V | ||
FNDA:0,A2::a2 ()V | ||
SF:test/coverage/A2.scala | ||
FN:-1,coverage/A2$::<clinit> ()V | ||
FN:8,coverage/A2$::<init> ()V | ||
FN:5,coverage/A2$::a2 ()V | ||
FN:-1,coverage/A2::a2 ()V | ||
FNDA:1,coverage/A2$::<clinit> ()V | ||
FNDA:1,coverage/A2$::<init> ()V | ||
FNDA:1,coverage/A2$::a2 ()V | ||
FNDA:0,coverage/A2::a2 ()V | ||
FNF:4 | ||
FNH:3 | ||
DA:3,4 | ||
DA:7,5 | ||
DA:5,11 | ||
DA:8,5 | ||
LH:2 | ||
LF:2 | ||
end_of_record | ||
SF:/B1.scala | ||
FN:-1,B1$::<clinit> ()V | ||
FN:7,B1$::<init> ()V | ||
FN:4,B1$::not_called ()V | ||
FN:-1,B1::not_called ()V | ||
FNDA:1,B1$::<clinit> ()V | ||
FNDA:1,B1$::<init> ()V | ||
FNDA:0,B1$::not_called ()V | ||
FNDA:0,B1::not_called ()V | ||
SF:test/coverage/B1.scala | ||
FN:-1,coverage/B1$::<clinit> ()V | ||
FN:9,coverage/B1$::<init> ()V | ||
FN:6,coverage/B1$::not_called ()V | ||
FN:-1,coverage/B1::not_called ()V | ||
FNDA:1,coverage/B1$::<clinit> ()V | ||
FNDA:1,coverage/B1$::<init> ()V | ||
FNDA:0,coverage/B1$::not_called ()V | ||
FNDA:0,coverage/B1::not_called ()V | ||
FNF:4 | ||
FNH:2 | ||
DA:4,0 | ||
DA:7,5 | ||
DA:6,0 | ||
DA:9,5 | ||
LH:1 | ||
LF:2 | ||
end_of_record | ||
SF:test/coverage/B2.java | ||
FN:3,coverage/B2::<init> ()V | ||
FN:5,coverage/B2::b2_a ()Ljava/lang/String; | ||
FN:9,coverage/B2::b2_b ()V | ||
FNDA:0,coverage/B2::<init> ()V | ||
FNDA:1,coverage/B2::b2_a ()Ljava/lang/String; | ||
FNDA:0,coverage/B2::b2_b ()V | ||
FNF:3 | ||
FNH:1 | ||
DA:3,0 | ||
DA:5,3 | ||
DA:9,0 | ||
DA:10,0 | ||
LH:1 | ||
LF:4 | ||
end_of_record | ||
SF:test/coverage/C2.scala | ||
FN:-1,coverage/C2$::<clinit> ()V | ||
FN:7,coverage/C2$::<init> ()V | ||
FN:5,coverage/C2$::c2 (Ljava/lang/String;)Ljava/lang/String; | ||
FN:-1,coverage/C2::c2 (Ljava/lang/String;)Ljava/lang/String; | ||
FNDA:1,coverage/C2$::<clinit> ()V | ||
FNDA:1,coverage/C2$::<init> ()V | ||
FNDA:1,coverage/C2$::c2 (Ljava/lang/String;)Ljava/lang/String; | ||
FNDA:1,coverage/C2::c2 (Ljava/lang/String;)Ljava/lang/String; | ||
FNF:4 | ||
FNH:4 | ||
DA:5,9 | ||
DA:7,5 | ||
LH:2 | ||
LF:2 | ||
end_of_record | ||
SF:/TestAll.scala | ||
FN:10,TestAll$$anonfun$1::<init> (LTestAll;)V | ||
FN:10,TestAll$$anonfun$1::apply ()V | ||
FN:10,TestAll$$anonfun$1::apply$mcV$sp ()V | ||
FN:6,TestAll$$anonfun$2::<init> (LTestAll;)V | ||
FN:6,TestAll$$anonfun$2::apply ()Lorg/scalatest/compatible/Assertion; | ||
FN:3,TestAll::<init> ()V | ||
FNDA:1,TestAll$$anonfun$1::<init> (LTestAll;)V | ||
FNDA:1,TestAll$$anonfun$1::apply ()V | ||
FNDA:1,TestAll$$anonfun$1::apply$mcV$sp ()V | ||
FNDA:1,TestAll$$anonfun$2::<init> (LTestAll;)V | ||
FNDA:1,TestAll$$anonfun$2::apply ()Lorg/scalatest/compatible/Assertion; | ||
FNDA:1,TestAll::<init> ()V | ||
SF:test/coverage/TestAll.scala | ||
FN:11,coverage/TestAll$$anonfun$1::<init> (Lcoverage/TestAll;)V | ||
FN:11,coverage/TestAll$$anonfun$1::apply ()V | ||
FN:11,coverage/TestAll$$anonfun$1::apply$mcV$sp ()V | ||
FN:7,coverage/TestAll$$anonfun$2::<init> (Lcoverage/TestAll;)V | ||
FN:7,coverage/TestAll$$anonfun$2::apply ()Lorg/scalatest/compatible/Assertion; | ||
FN:4,coverage/TestAll::<init> ()V | ||
FNDA:1,coverage/TestAll$$anonfun$1::<init> (Lcoverage/TestAll;)V | ||
FNDA:1,coverage/TestAll$$anonfun$1::apply ()V | ||
FNDA:1,coverage/TestAll$$anonfun$1::apply$mcV$sp ()V | ||
FNDA:1,coverage/TestAll$$anonfun$2::<init> (Lcoverage/TestAll;)V | ||
FNDA:1,coverage/TestAll$$anonfun$2::apply ()Lorg/scalatest/compatible/Assertion; | ||
FNDA:1,coverage/TestAll::<init> ()V | ||
FNF:6 | ||
FNH:6 | ||
BA:6,2 | ||
BA:7,2 | ||
BRF:1 | ||
BRH:1 | ||
DA:3,2 | ||
DA:5,22 | ||
DA:6,51 | ||
DA:9,23 | ||
DA:10,13 | ||
DA:4,2 | ||
DA:6,22 | ||
DA:7,51 | ||
DA:10,23 | ||
DA:11,13 | ||
LH:5 | ||
LF:5 | ||
end_of_record |