Skip to content

Conversation

@abhina-sree
Copy link
Contributor

This is to address the latest lit regressions https://lab.llvm.org/buildbot/#/builders/64/builds/1285 caused by using the internal lit shell. This change will limit using the internal lit shell to TableGen on AIX so we do not hit these regressions.

@llvmbot
Copy link
Member

llvmbot commented Oct 24, 2024

@llvm/pr-subscribers-testing-tools

Author: Abhina Sree (abhina-sree)

Changes

This is to address the latest lit regressions https://lab.llvm.org/buildbot/#/builders/64/builds/1285 caused by using the internal lit shell. This change will limit using the internal lit shell to TableGen on AIX so we do not hit these regressions.


Full diff: https://github.com/llvm/llvm-project/pull/113627.diff

2 Files Affected:

  • (modified) llvm/test/TableGen/lit.local.cfg (+6)
  • (modified) llvm/utils/lit/lit/llvm/config.py (-7)
diff --git a/llvm/test/TableGen/lit.local.cfg b/llvm/test/TableGen/lit.local.cfg
index 0e827479cd4123..1993ff5f16cbee 100644
--- a/llvm/test/TableGen/lit.local.cfg
+++ b/llvm/test/TableGen/lit.local.cfg
@@ -1,2 +1,8 @@
+import lit.formats
+
 config.suffixes = [".td"]
 config.excludes = ["Common", "Inputs"]
+
+# AIX 'diff' command doesn't support --strip-trailing-cr, but the internal
+# python implementation does, so use that for cross platform compatibility
+config.test_format = lit.formats.ShTest()
diff --git a/llvm/utils/lit/lit/llvm/config.py b/llvm/utils/lit/lit/llvm/config.py
index 1ef5796cd32e44..5f762ec7f3514a 100644
--- a/llvm/utils/lit/lit/llvm/config.py
+++ b/llvm/utils/lit/lit/llvm/config.py
@@ -57,13 +57,6 @@ def __init__(self, lit_config, config):
                 self.lit_config.note("using lit tools: {}".format(path))
                 lit_path_displayed = True
 
-        if platform.system() == "AIX":
-            # Diff on AIX doesn't have all the required features (see
-            # https://github.com/llvm/llvm-project/pull/108871 and
-            # https://github.com/llvm/llvm-project/pull/112997#issuecomment-2429656192)
-            # so always use the internal shell.
-            self.use_lit_shell = True
-
         if platform.system() == "OS/390":
             self.with_environment("_BPXK_AUTOCVT", "ON")
             self.with_environment("_TAG_REDIR_IN", "TXT")

Copy link
Member

@daltenty daltenty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me, assuming it resolves the current set of buildbot failures

@abhina-sree
Copy link
Contributor Author

I forgot to guard the change to be AIX-only in case it causes problems on other platforms, added that in now

@abhina-sree abhina-sree self-assigned this Oct 25, 2024
@abhina-sree abhina-sree requested review from jakeegan and kkwli October 25, 2024 15:43
@abhina-sree abhina-sree merged commit 9d88543 into llvm:main Oct 25, 2024
8 checks passed
@abhina-sree abhina-sree deleted the abhina/fix_aix branch October 25, 2024 17:06
NoumanAmir657 pushed a commit to NoumanAmir657/llvm-project that referenced this pull request Nov 4, 2024
…llvm#113627)

This is to address the latest lit regressions
https://lab.llvm.org/buildbot/#/builders/64/builds/1285 caused by using
the internal lit shell. This change will limit using the internal lit
shell to TableGen on AIX so we do not hit these regressions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants