blob: 96183f88ae65ff2f17d188bdd6437ad62d8e957c [file] [log] [blame]
// Copyright 2020 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package fuzzing
import (
"flag"
"os/exec"
"path/filepath"
"testing"
)
// This is only used when run via `go test`
const relativePath = "../../../../scripts/fuzzing"
var testDataDir = flag.String("test-data-dir", relativePath, "Path to `fx fuzz` files; only used in GN build")
func TestFxFuzzLib(t *testing.T) {
pyTestDir := filepath.Join(*testDataDir, "test")
cmd := exec.Command("python", "-m", "unittest", "discover", "-s", pyTestDir, "-p", "*_test.py", "-b")
output, err := cmd.CombinedOutput()
if err != nil {
t.Errorf("test failed: %v", err)
}
t.Log(string(output[:]))
}