mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-01 12:57:31 +09:00
import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo
This commit is contained in:
commit
dcd9973243
150858 changed files with 23884658 additions and 0 deletions
|
|
@ -0,0 +1,44 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# Copyright (c) 2013 Google Inc. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
"""
|
||||
Test that the generator output can be written to a different drive on Windows.
|
||||
"""
|
||||
|
||||
import os
|
||||
import TestGyp
|
||||
import string
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
if sys.platform == 'win32':
|
||||
import win32api
|
||||
|
||||
test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
|
||||
|
||||
def GetFirstFreeDriveLetter():
|
||||
""" Returns the first unused Windows drive letter in [A, Z] """
|
||||
all_letters = [c for c in string.uppercase]
|
||||
in_use = win32api.GetLogicalDriveStrings()
|
||||
free = list(set(all_letters) - set(in_use))
|
||||
return free[0]
|
||||
|
||||
output_dir = os.path.join('different-drive', 'output')
|
||||
if not os.path.isdir(os.path.abspath(output_dir)):
|
||||
os.makedirs(os.path.abspath(output_dir))
|
||||
output_drive = GetFirstFreeDriveLetter()
|
||||
subprocess.call(['subst', '%c:' % output_drive, os.path.abspath(output_dir)])
|
||||
try:
|
||||
test.run_gyp('prog.gyp', '--generator-output=%s' % (
|
||||
os.path.join(output_drive, 'output')))
|
||||
test.build('prog.gyp', test.ALL, chdir=os.path.join(output_drive, 'output'))
|
||||
test.built_file_must_exist('program', chdir=os.path.join(output_drive,
|
||||
'output'),
|
||||
type=test.EXECUTABLE)
|
||||
test.pass_test()
|
||||
finally:
|
||||
subprocess.call(['subst', '%c:' % output_drive, '/D'])
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright 2013 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
int main(void) {
|
||||
printf("Hello from prog.c\n");
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
# Copyright 2013 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
{
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'program',
|
||||
'type': 'executable',
|
||||
'sources': [
|
||||
'prog.c',
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue