summaryrefslogtreecommitdiff
path: root/fuzz/harnesses/fuzz_assert
blob: 6a0baa91e55bfc867499f2ca7efbf10939c163b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash -u
# Copyright (c) 2019 Yubico AB. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

T=fuzz_assert

sync() {
	mkdir ${T}
	ssh "${REMOTE}" "cd ${T} && tar -cf- corpus" | tar -C ${T} -xf-
}

run() {
	build/fuzz/fuzz_assert -max_len=17408 -runs=1 ${T}/corpus \
		2>/dev/null 1>&2
}

case "$1" in
sync)
	sync
	;;
run)
	run
	exit 0
	;;
*)
	echo unknown command "$1"
	exit 1
esac