diff --git a/timing/rob/rob_test.go b/timing/rob/rob_test.go index 143b2aa5..397e72f7 100644 --- a/timing/rob/rob_test.go +++ b/timing/rob/rob_test.go @@ -11,6 +11,8 @@ import ( "github.com/sarchlab/akita/v4/datarecording" ) +var dataRecorder *datarecording.SQLiteWriter + type myHook struct { f func(ctx sim.HookCtx) } @@ -35,6 +37,19 @@ func (b *sqliteTracerBackend) Flush() { b.backend.Flush() } +var _ = BeforeSuite(func() { + dataRecorder = datarecording.NewSQLiteWriter("test_database") + dataRecorder.Init() + dataRecorder.CreateTable("milestones", tracing.Milestone{}) + tracing.SetDataRecorder(dataRecorder) +}) + +var _ = AfterSuite(func() { + dataRecorder.Flush() + dataRecorder.DB.Close() + // os.Remove("test_database.sqlite3") +}) + var _ = Describe("Reorder Buffer", func() { var ( mockCtrl *gomock.Controller