File tree 2 files changed +5
-2
lines changed
src/client/testing/testController/common
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ export async function updateResultFromJunitXml(
97
97
}
98
98
99
99
const result = junitSuite . testcase . find ( ( t ) => {
100
- const idResult = getRunIdFromRawData ( `${ t . $ . classname } . ${ t . $ . name } ` ) ;
100
+ const idResult = getRunIdFromRawData ( `${ t . $ . classname } :: ${ t . $ . name } ` ) ;
101
101
const idNode = rawTestCaseNode . runId ;
102
102
return idResult === idNode || idNode . endsWith ( idResult ) ;
103
103
} ) ;
Original file line number Diff line number Diff line change @@ -88,9 +88,12 @@ function getRangeFromRawSource(raw: { source: string }): Range | undefined {
88
88
}
89
89
90
90
export function getRunIdFromRawData ( id : string ) : string {
91
+ // TODO: This is a temporary solution to normalize test ids.
92
+ // The current method is error prone and easy to break. When we
93
+ // re-write the test adapters we should make sure we consider this.
91
94
// This is the id that will be used to compare with the results.
92
95
const runId = id
93
- . replace ( / \. p y / g, '' )
96
+ . replace ( / \. p y [ ^ \w \- ] / g, '' ) // we want to get rid of the `.py` in file names
94
97
. replace ( / [ \\ \: \/ ] / g, '.' )
95
98
. replace ( / \: \: / g, '.' )
96
99
. replace ( / \. \. / g, '.' ) ;
You can’t perform that action at this time.
0 commit comments