From 3f504e9bd7faf2b01aeee319c8e6eecbc3458755 Mon Sep 17 00:00:00 2001 From: Evgeny Date: Wed, 27 Jan 2021 20:53:42 -0600 Subject: [PATCH] SWDEV-267558 : json rebasing supression by env ROCP_JSON_REBASE=0 Change-Id: I968d3922b1714dba09621a90c26cec959be55b91 --- bin/tblextr.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/bin/tblextr.py b/bin/tblextr.py index a4308d0def..3f22034289 100755 --- a/bin/tblextr.py +++ b/bin/tblextr.py @@ -673,15 +673,16 @@ inext = re.sub(r'^.*(\.[^\.]+)$', r'\1', inext) dbfile = '' csvfile = '' -begin_ts_file = indir + '/begin_ts_file.txt' -if os.path.isfile(begin_ts_file): - with open(begin_ts_file, mode='r') as fd: - ind = 0 - for line in fd.readlines(): - val = int(line) - if ind == 0 or val < START_NS: START_NS = val - ind += 1 - print('START timestamp found (' + str(START_NS) + 'ns)') +if 'ROCP_JSON_REBASE' in os.environ and os.environ['ROCP_JSON_REBASE'] == 0: + begin_ts_file = indir + '/begin_ts_file.txt' + if os.path.isfile(begin_ts_file): + with open(begin_ts_file, mode='r') as fd: + ind = 0 + for line in fd.readlines(): + val = int(line) + if ind == 0 or val < START_NS: START_NS = val + ind += 1 + print('START timestamp found (' + str(START_NS) + 'ns)') if re.search(r'\.csv$', outfile): csvfile = outfile