Skip to content

Commit

Permalink
fix: add more session fields
Browse files Browse the repository at this point in the history
  • Loading branch information
NSEcho committed Sep 17, 2023
1 parent feab57d commit 03ecfd6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/crash.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ var crashCmd = &cobra.Command{

time.Sleep(2 * time.Second)

_ = script.ExportsCall("setup", s.Method, s.UIApp, s.Delegate, s.Scene)

_ = script.ExportsCall("fuzz", s.Method, string(input))

return nil
Expand Down
3 changes: 3 additions & 0 deletions cmd/fuzz.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,11 @@ var fuzzCmd = &cobra.Command{
s := Session{
App: app,
Base: base,
Delegate: delegate,
Function: fn,
Method: method,
Scene: scene,
UIApp: uiapp,
}
if err := s.WriteToFile(); err != nil {
l.Errorf("Error writing session file: %v", err)
Expand Down
3 changes: 3 additions & 0 deletions cmd/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ func NewSession(sessionFile string) (*Session, error) {
type Session struct {
App string `yaml:"app"`
Base string `yaml:"base"`
Delegate string `yaml:"delegate"`
Function string `yaml:"fn"`
Method string `yaml:"method"`
Scene string `yaml:"scene"`
UIApp string `yaml:"uiapp"`
}

func (s *Session) WriteToFile() error {
Expand Down

0 comments on commit 03ecfd6

Please sign in to comment.