<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/docs/TestingGuide.rst, branch users/nico/python-2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[llvm][Docs] Make it clear where lit test files live (#124121)</title>
<updated>2025-01-24T08:29:44+00:00</updated>
<author>
<name>David Spickett</name>
<email>david.spickett@linaro.org</email>
</author>
<published>2025-01-24T08:29:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=97df7411fd99eb6b2ee54e0eadece490ae7a5a88'/>
<id>97df7411fd99eb6b2ee54e0eadece490ae7a5a88</id>
<content type='text'>
As someone on Discord was understandably confused because the build
directory does contain folder structures that look remarkably like the
source directory.

I used this page to explain it but realised that this must be from when
llvm was a separate repository. So `&lt;user home&gt;/llvm` probably was a
common path.

Now it's in llvm-project. So make that obvious in the instructions.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As someone on Discord was understandably confused because the build
directory does contain folder structures that look remarkably like the
source directory.

I used this page to explain it but realised that this must be from when
llvm was a separate repository. So `&lt;user home&gt;/llvm` probably was a
common path.

Now it's in llvm-project. So make that obvious in the instructions.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Finally formalise our defacto line-ending policy"</title>
<updated>2024-10-18T20:16:24+00:00</updated>
<author>
<name>Luke Drummond</name>
<email>luke.drummond@codeplay.com</email>
</author>
<published>2024-10-18T20:16:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e669bbbb7265a7d4d59bac2d3889194efa167ea8'/>
<id>e669bbbb7265a7d4d59bac2d3889194efa167ea8</id>
<content type='text'>
This reverts commit dccebddb3b802c4c1fe287222e454b63f850f012.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit dccebddb3b802c4c1fe287222e454b63f850f012.
</pre>
</div>
</content>
</entry>
<entry>
<title>Finally formalise our defacto line-ending policy</title>
<updated>2024-10-17T13:47:54+00:00</updated>
<author>
<name>Luke Drummond</name>
<email>luke.drummond@codeplay.com</email>
</author>
<published>2024-03-22T17:09:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=dccebddb3b802c4c1fe287222e454b63f850f012'/>
<id>dccebddb3b802c4c1fe287222e454b63f850f012</id>
<content type='text'>
Historically, we've not automatically enforced how git tracks line
endings, but there are many, many commits that "undo" unintended CRLFs
getting into history.

`git log --pretty=oneline --grep=CRLF` shows nearly 100 commits
involving reverts of CRLF making its way into the index and then
history. As far as I can tell, there are none the other way round except
for specific cases like `.bat` files or tests for parsers that need to
accept such sequences.

Of note, one of the earliest of those listed in that output is:

```
  commit 9795860250734e5c2a879546c534e35d9edd5944
  Author: NAKAMURA Takumi &lt;geek4civic@gmail.com&gt;
  Date:   Thu Feb 3 11:41:27 2011 +0000

      cmake/*: Add svn:eol-style=native and fix CRLF.

      llvm-svn: 124793
```

...which introduced such a defacto policy for subversion.

With old versions of git, it's been a bit of a crap-shoot whether
enforcing storing line endings in the history will upset checkouts on
machines where such line endings are the norm. Indeed many users have
enforced that git checks out the working copy according to a global or
per-user config via core crlf, or core autocrlf.

For ~8 years now[1], however, git has supported the ability to "do as
the Romans do" on checkout, but internally store subsets of text files
with line-endings specified via a system of patterns in the
`.gitattributes` file. Since we now have this ability, and we've been
specifying attributes for various binary files, I think it makes sense
to rid us of all that work converting things "back", and just let git
handle the local checkout. Thus the new toplevel policy here is

    * text=auto

In simple terms this means "unless otherwise specified, convert all
files considered "text" files to LF in the project history, but check
them out as expected on the local machine. What is "expected on the
local machine" is dependent on configuration and default.

For those files in the repository that *do* need CRLF endings, I've
adopted a policy of `eol=crlf` which means that git will store them in
history with LF, but regardless of user config, they'll be checked out
in tree with CRLF.

Finally, existing files have been "corrected" in history via `git add
--renormalize .`

End users should *not* need to adjust their local git config or
workflow.

[1]: git 2.10 was released with fixed support for fine-grained
line-ending tracking that respects user-config *and* repo policy. This
can be considered the point at which git will respect both the user's
local working tree preference *and* the history as specified by the
maintainers. See
https://github.com/git/git/blob/master/Documentation/RelNotes/2.10.0.txt#L248
for the release note.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Historically, we've not automatically enforced how git tracks line
endings, but there are many, many commits that "undo" unintended CRLFs
getting into history.

`git log --pretty=oneline --grep=CRLF` shows nearly 100 commits
involving reverts of CRLF making its way into the index and then
history. As far as I can tell, there are none the other way round except
for specific cases like `.bat` files or tests for parsers that need to
accept such sequences.

Of note, one of the earliest of those listed in that output is:

```
  commit 9795860250734e5c2a879546c534e35d9edd5944
  Author: NAKAMURA Takumi &lt;geek4civic@gmail.com&gt;
  Date:   Thu Feb 3 11:41:27 2011 +0000

      cmake/*: Add svn:eol-style=native and fix CRLF.

      llvm-svn: 124793
```

...which introduced such a defacto policy for subversion.

With old versions of git, it's been a bit of a crap-shoot whether
enforcing storing line endings in the history will upset checkouts on
machines where such line endings are the norm. Indeed many users have
enforced that git checks out the working copy according to a global or
per-user config via core crlf, or core autocrlf.

For ~8 years now[1], however, git has supported the ability to "do as
the Romans do" on checkout, but internally store subsets of text files
with line-endings specified via a system of patterns in the
`.gitattributes` file. Since we now have this ability, and we've been
specifying attributes for various binary files, I think it makes sense
to rid us of all that work converting things "back", and just let git
handle the local checkout. Thus the new toplevel policy here is

    * text=auto

In simple terms this means "unless otherwise specified, convert all
files considered "text" files to LF in the project history, but check
them out as expected on the local machine. What is "expected on the
local machine" is dependent on configuration and default.

For those files in the repository that *do* need CRLF endings, I've
adopted a policy of `eol=crlf` which means that git will store them in
history with LF, but regardless of user config, they'll be checked out
in tree with CRLF.

Finally, existing files have been "corrected" in history via `git add
--renormalize .`

End users should *not* need to adjust their local git config or
workflow.

[1]: git 2.10 was released with fixed support for fine-grained
line-ending tracking that respects user-config *and* repo policy. This
can be considered the point at which git will respect both the user's
local working tree preference *and* the history as specified by the
maintainers. See
https://github.com/git/git/blob/master/Documentation/RelNotes/2.10.0.txt#L248
for the release note.
</pre>
</div>
</content>
</entry>
<entry>
<title>[lit] Fix substitutions containing backslashes (#103042)</title>
<updated>2024-08-22T09:57:39+00:00</updated>
<author>
<name>Martin Storsjö</name>
<email>martin@martin.st</email>
</author>
<published>2024-08-22T09:57:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=51ca2354d0a4083b9219df131ceff98bccb622b4'/>
<id>51ca2354d0a4083b9219df131ceff98bccb622b4</id>
<content type='text'>
Substitutions can be added in a couple different ways; they can be added
via the calling python scripts by adding entries to the
config.substitutions dictionary, or via DEFINE lines in the scripts
themselves.

The substitution strings passed to Python's re classes are interpreted
so that backslashes expand to escape sequences, and literal backslashes
need to be escaped.

On Unix, the script defined substitutions don't (usually, so far)
contain backslashes - but on Windows, they often do, due to paths
containing backslashes. This lead to a Windows specific escaping of
backslashes before doing Python re substitutions - since
7c9eab8fef0ed79a5911d21eb97b6b0fa9d39f82. There's nothing inherently
Windows specific about this though - any intended literal backslashes in
the substitution strings need to be escaped; this is how the Python re
API works.

The DEFINE lines were added later, and in order to cope with
backslashes, escaping of backslashes was added in the SubstDirective
class in TestRunner, applying to DEFINE lines in the tests only.

The fact that the escaping right before passing to the Python re API was
done conditionally on Windows led to two inconsistencies:

- DEFINE lines in the tests that contain backslashes got double
backslashes on Windows. (This was visible as a FIXME in
llvm/utils/lit/tests/Inputs/shtest-define/value-escaped.txt.)

- Script provided substitutions containing backslashes did not work on
Unix, but they did work on Windows.

By removing the escaping from SubstDirective and escaping it
unconditionally in the processLine function, before feeding the
substitutions to Python's re classes, we should have consistent
behaviour across platforms, and get rid of the FIXME in the lit test.

This fixes issues with substitutions containing backslashes on Unix
platforms, as encountered in PR #86649.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Substitutions can be added in a couple different ways; they can be added
via the calling python scripts by adding entries to the
config.substitutions dictionary, or via DEFINE lines in the scripts
themselves.

The substitution strings passed to Python's re classes are interpreted
so that backslashes expand to escape sequences, and literal backslashes
need to be escaped.

On Unix, the script defined substitutions don't (usually, so far)
contain backslashes - but on Windows, they often do, due to paths
containing backslashes. This lead to a Windows specific escaping of
backslashes before doing Python re substitutions - since
7c9eab8fef0ed79a5911d21eb97b6b0fa9d39f82. There's nothing inherently
Windows specific about this though - any intended literal backslashes in
the substitution strings need to be escaped; this is how the Python re
API works.

The DEFINE lines were added later, and in order to cope with
backslashes, escaping of backslashes was added in the SubstDirective
class in TestRunner, applying to DEFINE lines in the tests only.

The fact that the escaping right before passing to the Python re API was
done conditionally on Windows led to two inconsistencies:

- DEFINE lines in the tests that contain backslashes got double
backslashes on Windows. (This was visible as a FIXME in
llvm/utils/lit/tests/Inputs/shtest-define/value-escaped.txt.)

- Script provided substitutions containing backslashes did not work on
Unix, but they did work on Windows.

By removing the escaping from SubstDirective and escaping it
unconditionally in the processLine function, before feeding the
substitutions to Python's re classes, we should have consistent
behaviour across platforms, and get rid of the FIXME in the lit test.

This fixes issues with substitutions containing backslashes on Unix
platforms, as encountered in PR #86649.
</pre>
</div>
</content>
</entry>
<entry>
<title>[test] Fix documentation of %{fs-sep} et al (#95088)</title>
<updated>2024-06-11T09:55:25+00:00</updated>
<author>
<name>Jay Foad</name>
<email>jay.foad@amd.com</email>
</author>
<published>2024-06-11T09:55:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9dfd0760cb8b4f7fdb32008ade70c605e844051e'/>
<id>9dfd0760cb8b4f7fdb32008ade70c605e844051e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Reland "[python] Bump Python minimum version to 3.8 (#78828)"</title>
<updated>2024-06-07T23:18:28+00:00</updated>
<author>
<name>Aiden Grossman</name>
<email>aidengrossman@google.com</email>
</author>
<published>2024-06-07T23:18:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=33f4a77d9218c1a2d5c994a8a8398479731612dc'/>
<id>33f4a77d9218c1a2d5c994a8a8398479731612dc</id>
<content type='text'>
This reverts commit b6824c9d459da059e247a60c1ebd1aeb580dacc2.

This relands commit 0a6c74e21cc6750c843310ab35b47763cddaaf32.

The original commit was reverted due to buildbot failures. These bots
should be updated now, so hopefully this will stick.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit b6824c9d459da059e247a60c1ebd1aeb580dacc2.

This relands commit 0a6c74e21cc6750c843310ab35b47763cddaaf32.

The original commit was reverted due to buildbot failures. These bots
should be updated now, so hopefully this will stick.
</pre>
</div>
</content>
</entry>
<entry>
<title>[utils] Add script to generate elaborated IR and assembly tests (#89026)</title>
<updated>2024-05-09T06:58:55+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2024-05-09T06:58:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=aacea0d0f67401f5a0b74947f3ff179ade9cbf6d'/>
<id>aacea0d0f67401f5a0b74947f3ff179ade9cbf6d</id>
<content type='text'>
Generally, IR and assembly test files benefit from being cleaned to
remove unnecessary details. However, for tests requiring elaborate
IR or assembly files where cleanup is less practical (e.g., large amount
of debug information output from Clang), the current practice is to
include the C/C++ source file and the generation instructions as
comments.

This is inconvenient when regeneration is needed. This patch adds
`llvm/utils/update_test_body.py` to allow easier regeneration.

`ld.lld --debug-names` tests (#86508) utilize this script for
Clang-generated assembly tests.

Note: `-o pipefail` is standard (since
https://www.austingroupbugs.net/view.php?id=789) but not supported by
dash.

Link:
https://discourse.llvm.org/t/utility-to-generate-elaborated-assembly-ir-tests/78408</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Generally, IR and assembly test files benefit from being cleaned to
remove unnecessary details. However, for tests requiring elaborate
IR or assembly files where cleanup is less practical (e.g., large amount
of debug information output from Clang), the current practice is to
include the C/C++ source file and the generation instructions as
comments.

This is inconvenient when regeneration is needed. This patch adds
`llvm/utils/update_test_body.py` to allow easier regeneration.

`ld.lld --debug-names` tests (#86508) utilize this script for
Clang-generated assembly tests.

Note: `-o pipefail` is standard (since
https://www.austingroupbugs.net/view.php?id=789) but not supported by
dash.

Link:
https://discourse.llvm.org/t/utility-to-generate-elaborated-assembly-ir-tests/78408</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Reland "[python] Bump Python minimum version to 3.8 (#78828)""</title>
<updated>2024-04-20T21:39:03+00:00</updated>
<author>
<name>Aiden Grossman</name>
<email>aidengrossman@google.com</email>
</author>
<published>2024-04-20T21:39:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b6824c9d459da059e247a60c1ebd1aeb580dacc2'/>
<id>b6824c9d459da059e247a60c1ebd1aeb580dacc2</id>
<content type='text'>
This reverts commit f2931182fc877e813974a5f53721f859bfb5b130.

This was again causing buildbot failures. #83962 has been updated with the new
failures, notifying the buildbot maintainers that they need to update their
bots.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit f2931182fc877e813974a5f53721f859bfb5b130.

This was again causing buildbot failures. #83962 has been updated with the new
failures, notifying the buildbot maintainers that they need to update their
bots.
</pre>
</div>
</content>
</entry>
<entry>
<title>Reland "[python] Bump Python minimum version to 3.8 (#78828)"</title>
<updated>2024-04-20T00:49:47+00:00</updated>
<author>
<name>Aiden Grossman</name>
<email>aidengrossman@google.com</email>
</author>
<published>2024-04-20T00:49:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f2931182fc877e813974a5f53721f859bfb5b130'/>
<id>f2931182fc877e813974a5f53721f859bfb5b130</id>
<content type='text'>
This reverts commit 2dfa30d0ca6fb6991640a18e53401d82f567f8ff.

This relands commit 0a6c74e21cc6750c843310ab35b47763cddaaf32.

This patch originally caused a host of buildbot failures due to several
buildbots not having the necessary python version. That was tracked in
issue #83962, and all bots that failed in the first round have now been
updated. This is an attempt to reland the patch to see if it sticks or
if there are a number of long-running bots where this patch will cause
failures.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 2dfa30d0ca6fb6991640a18e53401d82f567f8ff.

This relands commit 0a6c74e21cc6750c843310ab35b47763cddaaf32.

This patch originally caused a host of buildbot failures due to several
buildbots not having the necessary python version. That was tracked in
issue #83962, and all bots that failed in the first round have now been
updated. This is an attempt to reland the patch to see if it sticks or
if there are a number of long-running bots where this patch will cause
failures.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[python] Bump Python minimum version to 3.8 (#78828)"</title>
<updated>2024-02-20T05:51:54+00:00</updated>
<author>
<name>Aiden Grossman</name>
<email>agrossman154@yahoo.com</email>
</author>
<published>2024-02-20T05:51:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2dfa30d0ca6fb6991640a18e53401d82f567f8ff'/>
<id>2dfa30d0ca6fb6991640a18e53401d82f567f8ff</id>
<content type='text'>
This reverts commit 0a6c74e21cc6750c843310ab35b47763cddaaf32.

This created a lot of post-commit failures due to buildbots running
older versions of Python.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 0a6c74e21cc6750c843310ab35b47763cddaaf32.

This created a lot of post-commit failures due to buildbots running
older versions of Python.
</pre>
</div>
</content>
</entry>
</feed>
