diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2024-05-02 19:35:10 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2024-05-03 14:25:58 +0000 |
| commit | 3e60354bf2a2ad7e7fa81fe8107f3ce24e098287 (patch) | |
| tree | 385a30b0529d6412b546937d85791d823567bebf /pkg/fuzzer/fuzzer_test.go | |
| parent | a3ce1723b2f8f690652d181a96344ab9b1c438a4 (diff) | |
executor: make flatrpc build for C++
Diffstat (limited to 'pkg/fuzzer/fuzzer_test.go')
| -rw-r--r-- | pkg/fuzzer/fuzzer_test.go | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/pkg/fuzzer/fuzzer_test.go b/pkg/fuzzer/fuzzer_test.go index 5e275851a..13eb5609b 100644 --- a/pkg/fuzzer/fuzzer_test.go +++ b/pkg/fuzzer/fuzzer_test.go @@ -9,8 +9,6 @@ import ( "fmt" "hash/crc32" "math/rand" - "os" - "path/filepath" "regexp" "runtime" "strings" @@ -41,7 +39,7 @@ func TestFuzz(t *testing.T) { if sysTarget.BrokenCompiler != "" { t.Skipf("skipping, broken cross-compiler: %v", sysTarget.BrokenCompiler) } - executor := buildExecutor(t, target) + executor := csource.BuildExecutor(t, target, "../..", "-fsanitize-coverage=trace-pc", "-g") ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -318,18 +316,6 @@ func (proc *executorProc) execute(req *Request) (*Result, string, error) { return &Result{Info: info}, "", nil } -func buildExecutor(t *testing.T, target *prog.Target) string { - executor, err := csource.BuildFile(target, - filepath.FromSlash("../../executor/executor.cc"), - "-fsanitize-coverage=trace-pc", "-g", - ) - if err != nil { - t.Fatal(err) - } - t.Cleanup(func() { os.Remove(executor) }) - return executor -} - func checkGoroutineLeaks() { // Inspired by src/net/http/main_test.go. buf := make([]byte, 2<<20) |
