Skip to content

Commit ca49e60

Browse files
committed
test(end2end):set pc path to demo run
1 parent c728cfc commit ca49e60

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

_cmptest/llcppgend_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,11 @@ func testFrom(t *testing.T, tc testCase, gen bool) {
9595
t.Fatal(err)
9696
}
9797
}
98-
runDemos(t, filepath.Join(wd, tc.demosDir), tc.pkg.Name, filepath.Join(dir, tc.pkg.Name))
98+
runDemos(t, filepath.Join(wd, tc.demosDir), tc.pkg.Name, filepath.Join(dir, tc.pkg.Name), conanDir)
9999
}
100100

101101
// pkgpath is the filepath use to replace the import path in demo's go.mod
102-
func runDemos(t *testing.T, demosPath string, pkgname, pkgpath string) {
102+
func runDemos(t *testing.T, demosPath string, pkgname, pkgpath, pcPath string) {
103103
goMod := command("go", demosPath, "mod", "init", "test")
104104
err := goMod.Run()
105105
if err != nil {
@@ -131,6 +131,7 @@ func runDemos(t *testing.T, demosPath string, pkgname, pkgpath string) {
131131
}
132132
demoPath := filepath.Join(demosPath, demo.Name())
133133
demoCmd := command("llgo", demosPath, "run", demoPath)
134+
setPath(demoCmd, pcPath)
134135
err = demoCmd.Run()
135136
if err != nil {
136137
t.Fatal(err)

0 commit comments

Comments
 (0)