diff options
Diffstat (limited to 'infra/bots/recipe_modules/upload_nano_results')
4 files changed, 10 insertions, 10 deletions
diff --git a/infra/bots/recipe_modules/upload_nano_results/api.py b/infra/bots/recipe_modules/upload_nano_results/api.py index bfec2fd810..aabfdc6db8 100644 --- a/infra/bots/recipe_modules/upload_nano_results/api.py +++ b/infra/bots/recipe_modules/upload_nano_results/api.py @@ -17,16 +17,16 @@ class UploadNanoResultsApi(recipe_api.RecipeApi): now = self.m.time.utcnow() src_path = self.m.path['start_dir'].join( 'perfdata', builder_name, 'data') - results = self.m.file.glob( - 'find results', - '*.json', - cwd=src_path, - test_data=['nanobench_abc123.json'], - infra_step=True) + with self.m.step.context({'cwd': src_path}): + results = self.m.file.glob( + 'find results', + src_path.join('*.json'), + test_data=[src_path.join('nanobench_abc123.json')], + infra_step=True) if len(results) != 1: # pragma: nocover raise Exception('Unable to find nanobench or skpbench JSON file!') - src = src_path.join(results[0]) + src = results[0] basename = self.m.path.basename(src) gs_path = '/'.join(( 'nano-json-v1', str(now.year).zfill(4), diff --git a/infra/bots/recipe_modules/upload_nano_results/example.expected/normal_bot.json b/infra/bots/recipe_modules/upload_nano_results/example.expected/normal_bot.json index 2a5d199ab2..146e607228 100644 --- a/infra/bots/recipe_modules/upload_nano_results/example.expected/normal_bot.json +++ b/infra/bots/recipe_modules/upload_nano_results/example.expected/normal_bot.json @@ -5,7 +5,7 @@ "-u", "\nimport glob\nimport sys\nwith open(sys.argv[1], 'w') as f:\n f.write('\\n'.join(glob.glob(sys.argv[2])))\n", "/path/to/tmp/", - "*.json" + "[START_DIR]/perfdata/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug/data/*.json" ], "cwd": "[START_DIR]/perfdata/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug/data", "name": "find results" diff --git a/infra/bots/recipe_modules/upload_nano_results/example.expected/recipe_with_gerrit_patch.json b/infra/bots/recipe_modules/upload_nano_results/example.expected/recipe_with_gerrit_patch.json index 9eeab965b4..20a41f0b6d 100644 --- a/infra/bots/recipe_modules/upload_nano_results/example.expected/recipe_with_gerrit_patch.json +++ b/infra/bots/recipe_modules/upload_nano_results/example.expected/recipe_with_gerrit_patch.json @@ -5,7 +5,7 @@ "-u", "\nimport glob\nimport sys\nwith open(sys.argv[1], 'w') as f:\n f.write('\\n'.join(glob.glob(sys.argv[2])))\n", "/path/to/tmp/", - "*.json" + "[START_DIR]/perfdata/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot/data/*.json" ], "cwd": "[START_DIR]/perfdata/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot/data", "name": "find results" diff --git a/infra/bots/recipe_modules/upload_nano_results/example.expected/trybot.json b/infra/bots/recipe_modules/upload_nano_results/example.expected/trybot.json index 2b16c92b71..304d53a274 100644 --- a/infra/bots/recipe_modules/upload_nano_results/example.expected/trybot.json +++ b/infra/bots/recipe_modules/upload_nano_results/example.expected/trybot.json @@ -5,7 +5,7 @@ "-u", "\nimport glob\nimport sys\nwith open(sys.argv[1], 'w') as f:\n f.write('\\n'.join(glob.glob(sys.argv[2])))\n", "/path/to/tmp/", - "*.json" + "[START_DIR]/perfdata/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot/data/*.json" ], "cwd": "[START_DIR]/perfdata/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot/data", "name": "find results" |