⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 245692 in webkit


Ignore:
Timestamp:
May 23, 2019, 10:33:26 AM (7 years ago)
Author:
Keith Rollin
Message:

generate-xcfilelists should not store temporary build files in /tmp
https://bugs.webkit.org/show_bug.cgi?id=198136

Reviewed by Jonathan Bedard.

Provide the build infrastructure control of the location of
generate-xcfilelists' temporary files by creating them in the build
directory when possible.

  • Scripts/webkitpy/generate_xcfilelists_lib/application.py:

(get_xcode_project_temp_dir):

  • Scripts/webkitpy/generate_xcfilelists_lib/generators.py:

(BaseGenerator._generate_derived):
(BaseGenerator._generate_unified):
(BaseGenerator):
(BaseGenerator._get_temp_dir):

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r245677 r245692  
     12019-05-23  Keith Rollin  <krollin@apple.com>
     2
     3        generate-xcfilelists should not store temporary build files in /tmp
     4        https://bugs.webkit.org/show_bug.cgi?id=198136
     5
     6        Reviewed by Jonathan Bedard.
     7
     8        Provide the build infrastructure control of the location of
     9        generate-xcfilelists' temporary files by creating them in the build
     10        directory when possible.
     11
     12        * Scripts/webkitpy/generate_xcfilelists_lib/application.py:
     13        (get_xcode_project_temp_dir):
     14        * Scripts/webkitpy/generate_xcfilelists_lib/generators.py:
     15        (BaseGenerator._generate_derived):
     16        (BaseGenerator._generate_unified):
     17        (BaseGenerator):
     18        (BaseGenerator._get_temp_dir):
     19
    1202019-05-23  Philippe Normand  <philn@igalia.com>
    221
  • trunk/Tools/Scripts/webkitpy/generate_xcfilelists_lib/application.py

    r245364 r245692  
    460460        return self._getenv("BUILT_PRODUCTS_DIR")
    461461
     462    @util.LogEntryExit
     463    def get_xcode_project_temp_dir(self):
     464        assert util.is_running_under_xcode()
     465        return self._getenv("PROJECT_TEMP_DIR")
     466
    462467    # Return the named environment variable.
    463468    @util.LogEntryExit
  • trunk/Tools/Scripts/webkitpy/generate_xcfilelists_lib/generators.py

    r245531 r245692  
    254254            return
    255255
    256         with tempfile.NamedTemporaryFile() as input, tempfile.NamedTemporaryFile() as output:
     256        with tempfile.NamedTemporaryFile(dir=self._get_temp_dir()) as input, \
     257                tempfile.NamedTemporaryFile(dir=self._get_temp_dir()) as output:
    257258            (stdout, stderr) = util.subprocess_run(
    258259                    [script,
     
    309310            return
    310311
    311         with tempfile.NamedTemporaryFile() as output:
     312        with tempfile.NamedTemporaryFile(dir=self._get_temp_dir()) as output:
    312313
    313314            # We need to define BUILD_SCRIPTS_DIR so that the bash script we're
     
    642643        return None
    643644
     645    @util.LogEntryExit
     646    def _get_temp_dir(self):
     647        return self.application.get_xcode_project_temp_dir()
     648
    644649
    645650class JavaScriptCoreGenerator(BaseGenerator):
Note: See TracChangeset for help on using the changeset viewer.