blob: fb0e5f8d4d338a667b7c64e82dfbe4b18cc58b69 [file] [log] [blame]
#!/usr/bin/env python2.7
# Copyright 2019 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.
import argparse
import subprocess
import sys
from lib.args import Args
from lib.cipd import Cipd
from lib.corpus import Corpus
from lib.device import Device
from lib.fuzzer import Fuzzer
from import Host
def main():
parser = Args.make_parser(
'Transfers a fuzzing corpus for a named fuzzer from a device to CIPD')
args = parser.parse_args()
host = Host.from_build()
device = Device.from_args(host, args)
fuzzer = Fuzzer.from_args(device, args)
if fuzzer.measure_corpus()[0] == 0:
print('Ignoring ' + str(fuzzer) + '; corpus is empty.')
return 0
with Corpus.from_args(fuzzer, args) as corpus:
cipd = Cipd(corpus)
if not args.no_cipd:
return 0
if __name__ == '__main__':