2017-09-13 13:34:21 +00:00
|
|
|
// Copyright 2017 syzkaller project authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
package sys
|
|
|
|
|
|
|
|
import (
|
2019-03-22 17:38:28 +00:00
|
|
|
"strings"
|
|
|
|
"time"
|
|
|
|
|
2018-03-08 17:48:26 +00:00
|
|
|
// Import all targets, so that users only need to import sys.
|
2018-08-02 17:07:22 +00:00
|
|
|
_ "github.com/google/syzkaller/sys/akaros/gen"
|
|
|
|
_ "github.com/google/syzkaller/sys/freebsd/gen"
|
|
|
|
_ "github.com/google/syzkaller/sys/fuchsia/gen"
|
|
|
|
_ "github.com/google/syzkaller/sys/linux/gen"
|
|
|
|
_ "github.com/google/syzkaller/sys/netbsd/gen"
|
2018-08-28 17:07:26 +00:00
|
|
|
_ "github.com/google/syzkaller/sys/openbsd/gen"
|
2018-08-02 17:07:22 +00:00
|
|
|
_ "github.com/google/syzkaller/sys/test/gen"
|
|
|
|
_ "github.com/google/syzkaller/sys/windows/gen"
|
2017-09-13 13:34:21 +00:00
|
|
|
)
|
2017-09-14 09:47:11 +00:00
|
|
|
|
2019-03-22 17:38:28 +00:00
|
|
|
var (
|
|
|
|
GitRevision string // emitted by Makefile, may contain + at the end
|
|
|
|
GitRevisionBase string // without +
|
|
|
|
gitRevisionDate string // emitted by Makefile
|
|
|
|
GitRevisionDate time.Time // parsed from gitRevisionDate
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
GitRevisionBase = strings.Replace(GitRevision, "+", "", -1)
|
|
|
|
if gitRevisionDate != "" {
|
|
|
|
var err error
|
|
|
|
if GitRevisionDate, err = time.Parse("Mon Jan 2 15:04:05 2006 -0700", gitRevisionDate); err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|