Skip to content

Commit d211d73

Browse files
committed
fix(escape_adapter): fix result csv path
1 parent 5b59c26 commit d211d73

2 files changed

Lines changed: 5 additions & 9 deletions

File tree

cmd/escape_adapter/common_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,3 @@ import (
99
func testdatadir() string {
1010
return filepath.Join(utils.CurFileDir(), "testdata")
1111
}
12-
13-
func codeqlResultDir() string {
14-
return filepath.Join(utils.ProjectRoot(), "codeqlResult")
15-
}

cmd/escape_adapter/movedtoheap_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func TestCodeQLMovedToHeap3(t *testing.T) {
7171
}
7272

7373
func moved_to_heap_var_test(t *testing.T) {
74-
csvPath := filepath.Join(codeqlResultDir(), "escape_ext/moved_to_heap_var_test/escape.csv")
74+
csvPath := filepath.Join(utils.ProjectRoot(), "codeql-db/escape/results/lslightly/qlstat/escape_ext/moved_to_heap_var_test.csv")
7575
f, err := os.Open(csvPath)
7676
assert.Nil(t, err)
7777
reader := csv.NewReader(f)
@@ -82,7 +82,7 @@ func moved_to_heap_var_test(t *testing.T) {
8282
}
8383

8484
func inlined_var_test(t *testing.T) {
85-
csvPath := filepath.Join(codeqlResultDir(), "escape_ext/inlined_var_test/false-sharing.csv")
85+
csvPath := filepath.Join(utils.ProjectRoot(), "codeql-db/false-sharing/results/lslightly/qlstat/escape_ext/inlined_var_test.csv")
8686
f, err := os.Open(csvPath)
8787
assert.Nil(t, err)
8888
reader := csv.NewReader(f)
@@ -93,7 +93,7 @@ func inlined_var_test(t *testing.T) {
9393
}
9494

9595
func ref_in_go_test(t *testing.T) {
96-
csvPath := filepath.Join(codeqlResultDir(), "escape_ext/ref_in_go_test/false-sharing.csv")
96+
csvPath := filepath.Join(utils.ProjectRoot(), "codeql-db/false-sharing/results/lslightly/qlstat/escape_ext/ref_in_go_test.csv")
9797
f, err := os.Open(csvPath)
9898
assert.Nil(t, err)
9999
reader := csv.NewReader(f)
@@ -104,7 +104,7 @@ func ref_in_go_test(t *testing.T) {
104104
}
105105

106106
func heapvar_use_in_go_test(t *testing.T) {
107-
csvPath := filepath.Join(codeqlResultDir(), "escape_ext/heapvar_use_in_go_test/false-sharing.csv")
107+
csvPath := filepath.Join(utils.ProjectRoot(), "codeql-db/false-sharing/results/lslightly/qlstat/escape_ext/heapvar_use_in_go_test.csv")
108108
f, err := os.Open(csvPath)
109109
assert.Nil(t, err)
110110
reader := csv.NewReader(f)
@@ -115,7 +115,7 @@ func heapvar_use_in_go_test(t *testing.T) {
115115
}
116116

117117
func same_scope_go_ref_heapvar_test(t *testing.T) {
118-
csvPath := filepath.Join(codeqlResultDir(), "escape_ext/same_scope_go_ref_heapvar_test/false-sharing.csv")
118+
csvPath := filepath.Join(utils.ProjectRoot(), "codeql-db/false-sharing/results/lslightly/qlstat/escape_ext/same_scope_go_ref_heapvar_test.csv")
119119
f, err := os.Open(csvPath)
120120
assert.Nil(t, err)
121121
reader := csv.NewReader(f)

0 commit comments

Comments
 (0)