From 3d3264b3429d7f06f706f37f1975207a827d937d Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Sun, 10 Feb 2019 01:23:50 -0300 Subject: [PATCH] Revert "validate:launcher: Cache the result of meson introspect" This reverts commit 05ce6d3b92e88341bd9743b021b33ce606c5d1bc. We can't do that as it breaks meson logic to set envvars --- validate/launcher/apps/gstcheck.py | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/validate/launcher/apps/gstcheck.py b/validate/launcher/apps/gstcheck.py index 2a87277104..e5a449869f 100644 --- a/validate/launcher/apps/gstcheck.py +++ b/validate/launcher/apps/gstcheck.py @@ -106,21 +106,10 @@ class MesonTestsManager(TestsManager): mesontests = [] for i, bdir in enumerate(self.options.meson_build_dirs): bdir = os.path.abspath(bdir) - ninja_build = os.path.join(bdir, "build.ninja") - dumpfile = os.path.join(self.options.privatedir, - ninja_build.replace(os.path.sep, '_') + '_' + str(os.stat(ninja_build).st_mtime) + '.json') - try: - with open(dumpfile, 'r') as f: - tests_json = json.load(f) - except FileNotFoundError: - output = subprocess.check_output( - [meson, 'introspect', '--tests', bdir]) - json_str = output.decode() - with open(dumpfile, 'w') as f: - f.write(json_str) - tests_json = json.loads(json_str) + output = subprocess.check_output( + [meson, 'introspect', '--tests', bdir]) - for test_dict in tests_json: + for test_dict in json.loads(output.decode()): mesontests.append(test_dict) return mesontests