#7 0.9.0 rc2 Release
Closed 20 days ago by tstellar. Opened 2 months ago by tstellar.
rpms/ tstellar/python-lit llvm-9  into  master

@@ -0,0 +1,126 @@ 

+ From 003a3fb72da49da6177062f704fdf37d7b483f09 Mon Sep 17 00:00:00 2001

+ From: Tom Stellard <tstellar@redhat.com>

+ Date: Wed, 7 Aug 2019 14:34:21 -0700

+ Subject: [PATCH] Revert "lit: modernize the lit configuration for the lit

+  tests"

+ 

+ This reverts commit 83c28abdb252670ccf557e02042195c012b45431.

+ ---

+  llvm/utils/lit/tests/lit.cfg           | 43 ++++++++++++++++++++++++----------

+  llvm/utils/lit/tests/lit.site.cfg.in   |  3 ---

+  llvm/utils/lit/tests/shtest-timeout.py |  4 +++-

+  3 files changed, 33 insertions(+), 17 deletions(-)

+ 

+ diff --git a/llvm/utils/lit/tests/lit.cfg b/llvm/utils/lit/tests/lit.cfg

+ index 4648b1b..2af93d6 100644

+ --- a/llvm/utils/lit/tests/lit.cfg

+ +++ b/llvm/utils/lit/tests/lit.cfg

+ @@ -4,7 +4,6 @@ import os

+  import sys

+  

+  import lit.formats

+ -from lit.llvm import llvm_config

+  

+  # Configuration file for the 'lit' test runner.

+  

+ @@ -26,35 +25,42 @@ config.test_exec_root = config.test_source_root

+  

+  config.target_triple = '(unused)'

+  

+ +src_root = os.path.join(config.test_source_root, '..')

+  llvm_src_root = getattr(config, 'llvm_src_root', None)

+ -if llvm_src_root:

+ -  # ``test_source_root`` may be in LLVM's binary build directory which does not contain

+ +if llvm_src_root != None:

+ +  # ``src_root`` may be in LLVM's binary build directory which does not contain

+    # ``lit.py``, so use `llvm_src_root` instead.

+    lit_path = os.path.join(llvm_src_root, 'utils', 'lit')

+  else:

+ -  lit_path = os.path.join(config.test_source_root, '..')

+ +  lit_path = src_root

+  

+ -# Required because some tests import the lit module

+ -llvm_config.with_environment('PYTHONPATH', lit_path, append_path=True)

+ +pythonpath_list = [lit_path] # Required because some tests import the lit module

+  

+ -# Add llvm and lit tools directories if this config is being loaded indirectly.

+ -for attribute in ('llvm_tools_dir', 'lit_tools_dir'):

+ -    directory = getattr(config, attribute, None)

+ -    if directory:

+ -        llvm_config.with_environment('PATH', directory, append_path=True)

+ +# Ensure the user's PYTHONPATH is included.

+ +if 'PYTHONPATH' in os.environ:

+ +    pythonpath_list.append(os.environ['PYTHONPATH'])

+ +if 'PYTHONPATH' in config.environment:

+ +    pythonpath_list.append(config.environment['PYTHONPATH'])

+ +config.environment['PYTHONPATH'] = os.pathsep.join(pythonpath_list)

+  

+ +config.substitutions.append(('%{src_root}', src_root))

+  config.substitutions.append(('%{inputs}', os.path.join(

+ -    config.test_source_root, 'Inputs')))

+ +            src_root, 'tests', 'Inputs')))

+  config.substitutions.append(('%{lit}', "%%{python} %s" % (

+ -    os.path.join(lit_path, 'lit.py'),)))

+ +            os.path.join(lit_path, 'lit.py'),)))

+  config.substitutions.append(('%{python}', '"%s"' % (sys.executable)))

+  

+ +

+  # Enable coverage.py reporting, assuming the coverage module has been installed

+  # and sitecustomize.py in the virtualenv has been modified appropriately.

+  if lit_config.params.get('check-coverage', None):

+      config.environment['COVERAGE_PROCESS_START'] = os.path.join(

+          os.path.dirname(__file__), ".coveragerc")

+  

+ +# Add a feature to detect the Python version.

+ +config.available_features.add("python%d.%d" % (sys.version_info[0],

+ +                                                  sys.version_info[1]))

+ +

+  # Add a feature to detect if psutil is available

+  try:

+      import psutil

+ @@ -63,3 +69,14 @@ try:

+  except ImportError:

+      lit_config.warning('Could not import psutil. Some tests will be skipped and'

+                         ' the --timeout command line argument will not work.')

+ +

+ +if sys.platform.startswith('win') or sys.platform.startswith('cygwin'):

+ +    config.available_features.add('windows')

+ +

+ +# Add llvm and lit tools directories if this config is being loaded indirectly.

+ +path = config.environment['PATH']

+ +for attribute in ('llvm_tools_dir', 'lit_tools_dir'):

+ +    directory = getattr(config, attribute, None)

+ +    if directory:

+ +        path = os.path.pathsep.join((directory, path))

+ +config.environment['PATH'] = path

+ diff --git a/llvm/utils/lit/tests/lit.site.cfg.in b/llvm/utils/lit/tests/lit.site.cfg.in

+ index 43f4e40..693364c 100644

+ --- a/llvm/utils/lit/tests/lit.site.cfg.in

+ +++ b/llvm/utils/lit/tests/lit.site.cfg.in

+ @@ -16,8 +16,5 @@ except KeyError:

+      key, = e.args

+      lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))

+  

+ -import lit.llvm

+ -lit.llvm.initialize(lit_config, config)

+ -

+  # Let the main config do the real work.

+  lit_config.load_config(config, "@LLVM_BINARY_DIR@/utils/lit/tests/lit.cfg")

+ diff --git a/llvm/utils/lit/tests/shtest-timeout.py b/llvm/utils/lit/tests/shtest-timeout.py

+ index 1208e73..aa7d7e1 100644

+ --- a/llvm/utils/lit/tests/shtest-timeout.py

+ +++ b/llvm/utils/lit/tests/shtest-timeout.py

+ @@ -1,7 +1,9 @@

+  # REQUIRES: python-psutil

+  

+  # llvm.org/PR33944

+ -# UNSUPPORTED: system-windows

+ +# This should be system-windows as windows does not cover all cases, but

+ +# apparently neither does system-windows

+ +# UNSUPPORTED: windows

+  

+  # FIXME: This test is fragile because it relies on time which can

+  # be affected by system performance. In particular we are currently

+ -- 

+ 1.8.3.1

+ 

file modified
+13 -4

@@ -6,6 +6,7 @@ 

  %global with_python2 1

  %endif

  

+ %global rc_ver 2

  %bcond_without check

  

  # FIXME: Work around for rhel not having py2_build/py2_install macro.

@@ -13,14 +14,20 @@ 

  %{!?py2_install: %global py2_install %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} install -O1 --skip-build --root %{buildroot}}}

  

  Name: python-%{srcname}

- Version: 0.8.0

- Release: 7%{?dist}

+ Version: 0.9.0

+ Release: 0.1.rc%{rc_ver}%{?dist}

  BuildArch: noarch

  

  License: NCSA

  Summary: Tool for executing llvm test suites

  URL: https://pypi.python.org/pypi/lit

- Source0: https://files.pythonhosted.org/packages/ba/da/c4b2b6ab24c840169e090d6e8f4c1bfa1e8a6b9d0ef3f8ed57ee9f72a317/lit-0.8.0.tar.gz

+ Source0: https://files.pythonhosted.org/packages/83/09/fc5c9a1933b3c01e547416b9f2df4b12cabba8740bb5c8a0fd0b7f4d874b/lit-0.9.0rc2.tar.gz

+ 

+ # Revert 361998 since it broke running python3 lit.py tests.  This does

+ # not change lit functionality at all, it only modifies files in

+ # the tests/ directory.

+ # It seems like upstream might not support running tests this way.

+ Patch0: 0001-Revert-lit-modernize-the-lit-configuration-for-the-l.patch

  

  # for file check

  %if %{with check}

@@ -58,7 +65,7 @@ 

  %endif

  

  %prep

- %autosetup -n %{srcname}-%{version}%{?rc_ver:rc%{rc_ver}}

+ %autosetup -n %{srcname}-%{version}%{?rc_ver:rc%{rc_ver}} -p4

  

  %build

  %py3_build

@@ -101,6 +108,8 @@ 

  %endif

  

  %changelog

+ * Thu Aug 22 2019 Tom Stellard <tstellar@redhat.com> - 0.9.0-0.1.rc2

+ - 0.9.0 rc2 Release

  

  * Tue Aug 20 2019 sguelton@redhat.com - 8.0.0-7

  - Rebuild for Python 3.8 with test, preparatory work for rhbz#1715016

no initial comment

Pull-Request has been closed by tstellar

20 days ago