aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/aflow/flow/patching/actions_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/aflow/flow/patching/actions_test.go')
-rw-r--r--pkg/aflow/flow/patching/actions_test.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/pkg/aflow/flow/patching/actions_test.go b/pkg/aflow/flow/patching/actions_test.go
index c6f3011e7..c2e18141b 100644
--- a/pkg/aflow/flow/patching/actions_test.go
+++ b/pkg/aflow/flow/patching/actions_test.go
@@ -9,6 +9,8 @@ import (
"testing"
"github.com/google/syzkaller/pkg/aflow"
+ "github.com/google/syzkaller/pkg/osutil"
+ "github.com/stretchr/testify/require"
)
func TestRecentCommits(t *testing.T) {
@@ -17,8 +19,11 @@ func TestRecentCommits(t *testing.T) {
if os.Getenv("CI") != "" {
t.Skip("skipping on CI because of shallow git checkout")
}
- aflow.TestAction(t, getRecentCommits, recentCommitsArgs{
- KernelSrc: filepath.FromSlash("../../../.."),
+ dir := t.TempDir()
+ require.NoError(t, osutil.MkdirAll(filepath.Join(dir, "repo")))
+ require.NoError(t, os.Symlink(osutil.Abs(filepath.FromSlash("../../../..")),
+ filepath.Join(dir, "repo", "linux")))
+ aflow.TestAction(t, getRecentCommits, dir, recentCommitsArgs{
KernelCommit: "e01a0ca6c12c9851ea7090f13879255ef82291e7",
PatchDiff: `
diff --git a/dashboard/app/ai.go b/dashboard/app/ai.go