Can run most of test suite (with hacks).

pull/356/head
Jussi Pakkanen 9 years ago
parent 8b1039fa30
commit a5508d3fd3
  1. 15
      meson/backends.py
  2. 2
      meson/environment.py
  3. 3
      meson/mesonmain.py
  4. 2
      meson/ninjabackend.py
  5. 30
      meson/wrap.py
  6. 7
      run_tests.py
  7. 0
      scripts/commandrunner.py
  8. 0
      scripts/delwithsuffix.py
  9. 0
      scripts/depfixer.py
  10. 0
      scripts/dirchanger.py
  11. 0
      scripts/gtkdochelper.py
  12. 0
      scripts/meson_benchmark.py
  13. 15
      scripts/meson_install.py
  14. 1
      scripts/meson_test.py
  15. 0
      scripts/mesonconf.py
  16. 0
      scripts/mesongui.py
  17. 0
      scripts/mesonintrospect.py
  18. 0
      scripts/regen_checker.py
  19. 0
      scripts/symbolextractor.py
  20. 0
      scripts/vcstagger.py
  21. 29
      scripts/wraptool.py

@ -19,6 +19,21 @@ from . import mesonlib
import json
from .coredata import MesonException
class InstallData():
def __init__(self, source_dir, build_dir, prefix, depfixer):
self.source_dir = source_dir
self.build_dir= build_dir
self.prefix = prefix
self.targets = []
self.depfixer = depfixer
self.headers = []
self.man = []
self.data = []
self.po_package_name = ''
self.po = []
self.install_scripts = []
self.install_subdirs = []
class TestSerialisation:
def __init__(self, name, suite, fname, is_cross, exe_wrapper, is_parallel, cmd_args, env,
should_fail, valgrind_args, timeout, workdir, extra_paths):

@ -125,7 +125,7 @@ class Environment():
coredata.save(self.coredata, cdf)
def get_script_dir(self):
return os.path.dirname(self.meson_script_file)
return os.path.join(os.path.dirname(self.meson_script_file), '../scripts')
def get_log_dir(self):
return self.log_dir

@ -220,6 +220,3 @@ def run(args):
traceback.print_exc()
return 1
return 0
if __name__ == '__main__':
sys.exit(run(sys.argv[:]))

@ -18,7 +18,7 @@ from . import build
from . import mlog
from . import dependencies
from .mesonlib import File
from .meson_install import InstallData
from .backends import InstallData
from .build import InvalidArguments
from .coredata import MesonException
import os, sys, pickle, re

@ -17,7 +17,33 @@ import urllib.request, os, hashlib, shutil
import subprocess
import sys
from . import wraptool
try:
import ssl
has_ssl = True
API_ROOT = 'https://wrapdb.mesonbuild.com/v1/'
except ImportError:
has_ssl = False
API_ROOT = 'http://wrapdb.mesonbuild.com/v1/'
def open_wrapdburl(urlstring):
global ssl_warning_printed
if has_ssl:
try:
return urllib.request.urlopen(urlstring)#, context=build_ssl_context())
except urllib.error.URLError:
if not ssl_warning_printed:
print('SSL connection failed. Falling back to unencrypted connections.')
ssl_warning_printed = True
if not ssl_warning_printed:
print('Warning: SSL not available, traffic not authenticated.',
file=sys.stderr)
ssl_warning_printed = True
# Trying to open SSL connection to wrapdb fails because the
# certificate is not known.
if urlstring.startswith('https'):
urlstring = 'http' + urlstring[5:]
return urllib.request.urlopen(urlstring)
class PackageDefinition:
def __init__(self, fname):
@ -94,7 +120,7 @@ class Resolver:
def get_data(self, url):
blocksize = 10*1024
if url.startswith('https://wrapdb.mesonbuild.com'):
resp = wraptool.open_wrapdburl(url)
resp = open_wrapdburl(url)
else:
resp = urllib.request.urlopen(url)
dlsize = int(resp.info()['Content-Length'])

@ -21,12 +21,13 @@ import sys
from meson import environment
from meson import mesonlib
from meson import mlog
from meson import meson, meson_test, meson_benchmark
from meson import mesonmain
from scripts import meson_test, meson_benchmark
import argparse
import xml.etree.ElementTree as ET
import time
from meson.meson import backendlist
from meson.mesonmain import backendlist
class TestResult:
def __init__(self, msg, stdo, stde, conftime=0, buildtime=0, testtime=0):
@ -154,7 +155,7 @@ def run_configure_inprocess(commandlist):
old_stderr = sys.stderr
sys.stderr = mystderr = StringIO()
try:
returncode = meson.run(commandlist)
returncode = mesonmain.run(commandlist)
finally:
sys.stdout = old_stdout
sys.stderr = old_stderr

@ -17,21 +17,6 @@
import sys, pickle, os, shutil, subprocess, gzip, platform
from glob import glob
class InstallData():
def __init__(self, source_dir, build_dir, prefix, depfixer):
self.source_dir = source_dir
self.build_dir= build_dir
self.prefix = prefix
self.targets = []
self.depfixer = depfixer
self.headers = []
self.man = []
self.data = []
self.po_package_name = ''
self.po = []
self.install_scripts = []
self.install_subdirs = []
def do_install(datafilename):
ifile = open(datafilename, 'rb')
d = pickle.load(ifile)

@ -14,6 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import meson
import sys, os, subprocess, time, datetime, pickle, multiprocessing, json
import concurrent.futures as conc
import argparse

@ -14,18 +14,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import urllib.request, json
import json
import sys, os
import configparser
import shutil
import platform
try:
import ssl
has_ssl = True
API_ROOT = 'https://wrapdb.mesonbuild.com/v1/'
except ImportError:
has_ssl = False
API_ROOT = 'http://wrapdb.mesonbuild.com/v1/'
ssl_warning_printed = False
@ -64,25 +56,6 @@ def build_ssl_context():
ctx.load_default_certs()
return ctx
def open_wrapdburl(urlstring):
global ssl_warning_printed
if has_ssl:
try:
return urllib.request.urlopen(urlstring)#, context=build_ssl_context())
except urllib.error.URLError:
if not ssl_warning_printed:
print('SSL connection failed. Falling back to unencrypted connections.')
ssl_warning_printed = True
if not ssl_warning_printed:
print('Warning: SSL not available, traffic not authenticated.',
file=sys.stderr)
ssl_warning_printed = True
# Trying to open SSL connection to wrapdb fails because the
# certificate is not known.
if urlstring.startswith('https'):
urlstring = 'http' + urlstring[5:]
return urllib.request.urlopen(urlstring)
def get_result(urlstring):
u = open_wrapdburl(urlstring)
data = u.read().decode('utf-8')
Loading…
Cancel
Save