diff options
Diffstat (limited to 'fluent-bit/tests/internal/data/pack/mixed.py')
-rw-r--r-- | fluent-bit/tests/internal/data/pack/mixed.py | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/fluent-bit/tests/internal/data/pack/mixed.py b/fluent-bit/tests/internal/data/pack/mixed.py deleted file mode 100644 index 7ad0a614..00000000 --- a/fluent-bit/tests/internal/data/pack/mixed.py +++ /dev/null @@ -1,31 +0,0 @@ -# Fluent Bit / Pack mixed samples to JSON -# ======================================= -# This script generate the JSON formatted strings for the mixed_ABC.txt samples. - -import os -import json -import msgpack - -def gen_json(f): - raw = open(f, 'r') - data = raw.read() - raw.close() - - out_mp = f[:-4] + ".mp" - out_json = f[:-4] + ".json" - - # Write messagepack - fmp = open(out_mp, 'w') - fmp.write(msgpack.packb(data)) - fmp.close() - - fjson = open(out_json, 'w') - fjson.write(json.dumps(data)) - fjson.close() - -for fn in os.listdir('.'): - if not os.path.isfile(fn): - continue - - if fn.startswith('mixed_') and fn.endswith('.txt'): - gen_json(fn) |