mirror of
https://github.com/reactos/syzkaller-ros.git
synced 2024-11-26 21:20:33 +00:00
sys: check in generated files
We used to have all generated files checked in. Later we removed them (now users are supposed to run make to generate them). This causes several problems: - go get does not work as it tries to build everything straight away (go get -d works, but users are confused) - users don't run make and complain that build is broken - users don't re-run make after updates and complain that build is broken - hard to integrate into other build system (even if they support building Go, they don't support running sysgen out-of-the-box) Fixes #216
This commit is contained in:
parent
b94b250a78
commit
3751542e1e
4
.gitignore
vendored
4
.gitignore
vendored
@ -4,7 +4,3 @@
|
||||
workdir*
|
||||
|
||||
bin/
|
||||
sys/sys_amd64.go
|
||||
sys/sys_arm64.go
|
||||
sys/sys_ppc64le.go
|
||||
executor/syscalls.h
|
||||
|
1
Makefile
1
Makefile
@ -9,7 +9,6 @@ endif
|
||||
.PHONY: all format clean manager fuzzer executor execprog mutate prog2c stress extract generate repro
|
||||
|
||||
all:
|
||||
$(MAKE) generate
|
||||
go install ./syz-manager ./syz-fuzzer
|
||||
$(MAKE) manager
|
||||
$(MAKE) fuzzer
|
||||
|
4542
executor/syscalls.h
Normal file
4542
executor/syscalls.h
Normal file
File diff suppressed because it is too large
Load Diff
23259
sys/sys_amd64.go
Normal file
23259
sys/sys_amd64.go
Normal file
File diff suppressed because one or more lines are too long
23173
sys/sys_arm64.go
Normal file
23173
sys/sys_arm64.go
Normal file
File diff suppressed because one or more lines are too long
23163
sys/sys_ppc64le.go
Normal file
23163
sys/sys_ppc64le.go
Normal file
File diff suppressed because one or more lines are too long
@ -8,6 +8,7 @@ import (
|
||||
"bytes"
|
||||
"flag"
|
||||
"fmt"
|
||||
"go/format"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
@ -810,7 +811,12 @@ func isIdentifier(s string) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func writeSource(file string, src []byte) {
|
||||
func writeSource(file string, data []byte) {
|
||||
src, err := format.Source(data)
|
||||
if err != nil {
|
||||
fmt.Printf("%s\n", data)
|
||||
failf("failed to format output: %v", err)
|
||||
}
|
||||
if oldSrc, err := ioutil.ReadFile(file); err == nil && bytes.Equal(src, oldSrc) {
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user