diff --git a/src/fuzzing/BUILD.gn b/src/fuzzing/BUILD.gn index e2c7b803428112421b7e0f97a7f6dfd53170ab56..bdd572d5b179ffe1f68f07d822a7c0fdae30d565 100644 --- a/src/fuzzing/BUILD.gn +++ b/src/fuzzing/BUILD.gn @@ -8,17 +8,17 @@ import("//build/go/go_test.gni") group("tests") { testonly = true public_deps = [ - ":host_fuzzers_test($host_toolchain)", + ":fuzzing_host_test($host_toolchain)", ] } -go_library("host_fuzzers_test_lib") { +go_library("fuzzing_host_test_lib") { name = "fuzzing" } -go_test("host_fuzzers_test") { +go_test("fuzzing_host_test") { gopackage = "fuzzing" deps = [ - ":host_fuzzers_test_lib", + ":fuzzing_host_test_lib", ] } diff --git a/src/fuzzing/host_test.go b/src/fuzzing/host_test.go index 96e4e80c41120261dc45929e1928138b838e120d..03660fa461b9aa55bbd97c44867ad5fe319e22b0 100644 --- a/src/fuzzing/host_test.go +++ b/src/fuzzing/host_test.go @@ -21,6 +21,28 @@ type FuzzSpec struct { Targets []string `json:"fuzz_targets"` } +func TestFxFuzzLib(t *testing.T) { + fuchsiaDir, found := os.LookupEnv("FUCHSIA_DIR") + if !found { + t.SkipNow() + } + scriptsFuzzingTests := []string{ + "cipd_test.py", + "device_test.py", + "fuzzer_test.py", + "host_test.py", + } + for _, test := range scriptsFuzzingTests { + pytest := path.Join(fuchsiaDir, "scripts", "fuzzing", "test", test) + cmd := exec.Command("python", pytest) + output, err := cmd.CombinedOutput() + if err != nil { + t.Errorf("%s failed:: %v", test, err) + } + t.Log(string(output[:])) + } +} + func TestHostFuzzers(t *testing.T) { // Search the build directory structure for host variant fuzzer builds. // This is necessarily sensitive to the layout of the build directory and