From f2210ba1ed2a6fccb267b3435800cefbb849b730 Mon Sep 17 00:00:00 2001 From: Andrew Halberstadt Date: Fri, 30 Aug 2019 17:01:12 +0000 Subject: [PATCH] Bug 1568638 - [build] Create objdir in test_manifest backend if it doesn't exist r=mshal This fixes an edge case where a task needs to invoke the TestManifest backend from a source dir that doesn't have an objdir created yet. Depends on D43513 Differential Revision: https://phabricator.services.mozilla.com/D43514 --HG-- extra : moz-landing-system : lando --- python/mozbuild/mozbuild/gen_test_backend.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python/mozbuild/mozbuild/gen_test_backend.py b/python/mozbuild/mozbuild/gen_test_backend.py index dfd3aac32736..ccf7e712bf2e 100644 --- a/python/mozbuild/mozbuild/gen_test_backend.py +++ b/python/mozbuild/mozbuild/gen_test_backend.py @@ -4,6 +4,7 @@ from __future__ import absolute_import, print_function +import os import sys from mozbuild.backend.test_manifest import TestManifestBackend @@ -22,6 +23,10 @@ def gen_test_backend(): # to be re-created if configure runs. If the file doesn't exist, # mozbuild continually thinks the TestManifest backend is out of date # and tries to regenerate it. + + if not os.path.isdir(build_obj.topobjdir): + os.makedirs(build_obj.topobjdir) + config_status = mozpath.join(build_obj.topobjdir, 'config.status') open(config_status, 'w').close()