From 3e60354bf2a2ad7e7fa81fe8107f3ce24e098287 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 2 May 2024 19:35:10 +0200 Subject: executor: make flatrpc build for C++ --- pkg/fuzzer/fuzzer_test.go | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'pkg/fuzzer/fuzzer_test.go') 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) -- cgit mrf-deployment