forked from vesoft-inc/nebula-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGraphService-fuzzer
45 lines (37 loc) · 1.25 KB
/
GraphService-fuzzer
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env python
#
# Autogenerated by Thrift
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
# @generated
#
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import os
import sys
if (not sys.argv[0].endswith("par") and
not sys.argv[0].endswith("xar") and
os.getenv('PAR_UNPACK_TMP') == None):
f = open(sys.argv[0], "r")
f.readline() # This will be #!/bin/bash
line = f.readline()
f.close()
# The par generator tool always has '# This par was made' as the
# second line. See fbcode/tools/make_par/make_par.py
if (not line.startswith('# This par was made')):
print("""WARNING
You are trying to run *-fuzzer.py which is
incorrect as the paths are not set up correctly.
Instead, you should generate your thrift file with
thrift_library and then run the resulting
*-fuzzer.par.
For more information, please read
http://fburl.com/python-remotes""")
exit()
from . import GraphService
from . import ttypes
from . import constants
import nebula3.fbthrift.util.fuzzer
nebula3.fbthrift.util.fuzzer.fuzz_service(GraphService, ttypes, constants)