From: Francis Deslauriers Date: Wed, 25 Jan 2017 00:14:12 +0000 (-0500) Subject: Lava: Omitting runs with missing metadata file X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=f18335dab96418d5551098c04e4d0800982cfddc;p=lttng-ci.git Lava: Omitting runs with missing metadata file Signed-off-by: Francis Deslauriers --- diff --git a/scripts/lttng-baremetal-tests/generate-plots.py b/scripts/lttng-baremetal-tests/generate-plots.py index 30005cc..03a4e18 100644 --- a/scripts/lttng-baremetal-tests/generate-plots.py +++ b/scripts/lttng-baremetal-tests/generate-plots.py @@ -123,7 +123,11 @@ def create_metadata_file(res_dir): for dirname, dirnames, res_files in os.walk('./'+res_dir): if len(dirnames) > 0: continue - metadata = pd.read_csv(os.path.join(dirname, 'metadata.csv')) + try: + metadata = pd.read_csv(os.path.join(dirname, 'metadata.csv')) + except Exception: + print('Omitting run {} because metadata.csv is missing'.format(dirname)) + continue list_.append(metadata) df = pd.concat(list_) @@ -140,7 +144,11 @@ def create_plots(res_dir): for dirname, dirnames, res_files in os.walk('./'+res_dir): if len(dirnames) > 0: continue - metadata = pd.read_csv(os.path.join(dirname, 'metadata.csv')) + try: + metadata = pd.read_csv(os.path.join(dirname, 'metadata.csv')) + except Exception: + print('Omitting run {} because metadata.csv is missing'.format(dirname)) + continue for res in res_files: if res in 'metadata.csv':