This solves deprecation warnings in build-script:
```
DeprecationWarning: 'pipes' is deprecated and slated for removal in Python 3.13
```
This change assumes that the minimum version
of Python3 is 3.3, which has `shlex.quote`.
Since our build bots currently use 3.6 as their
Python version, we can't yet use `shlex.join`
to further simplify some of the code using
quote.
The `__future__` we relied on is now, where the 3 specific things are
all included [since Python 3.0](https://docs.python.org/3/library/__future__.html):
* absolute_import
* print_function
* unicode_literals
* division
These import statements are no-ops and are no longer necessary.
Here we fix a few portability issues affecting running the validation tests on OpenBSD. The remaining failures will be dealt with separately.
1. In the `rth` tool, ensure `-z origin` is specified to the linker when
using `$ORIGIN`, as required on this platform.
2. Explicitly set the rpath in the `dsohandle-multi-module` execution
test, since the test uses built dynamic libraries during the test.
3. Erase the environment variable instead of using `env -u`, the latter
of which is not portable.
The tests need to change the working directory when executing on Windows
as RPATH is not supported on the platform. The current working
directory gets precedence over `PATH` for library lookup. This allows
the last of the Evolution tests pass on Windows.
Windows does not support the concept of RPATH. As a result, we must
change the working directory for the test. This extends the support
for the tests to work with PE/COFF on Windows. Use the newly minted
`self.triple` property to drive the host detection. This means that
the test coverage on Windows is able to test most of the resilience
functionality.
The resilience test helper builds up invocations of the tooling. In
order to do this, we need to know what host we are building for. Plumb
the value for `-triple` from the test harness into the utility. This
will be used subsequently to enable additional testing for Windows.
This adds a new mode where we always build the app with the new library,
and run it with the old and new library. This is used to test backward
deployment of code that uses weak-linked symbols.
To ensure that we properly crash if we reference an undefined symbol that
is not weak linked, also pass a linker flag to bind symbols eagerly.
A resilient change should not *remove* previously-public symbols.
Note that currently, the test_superclass_properties test does not
meet this critierion, because we always emit keypath property
descriptors, even when the property is an override. Fixing this
is a larger change that I'll address in a follow-on PR, so for now
I'm just going to disable the symbol check for this one test only.
Part of <rdar://problem/40432647>.
At least test_rth.swift is checking the name of the executable
during the test, so renaming every executable to __executable in
Android will never work.
Also, during the rth tool execution, all the results from before
and after are pushed for every test. Since Android copies the
passed files without relative paths, the library files will
overwrite each other, making the test fail.
Depends on #19949 (more or less)
Most of this is just "remember to specify the inputs and outputs on
the command line, so remote-run can see them". A bit is "prefix
environment variables with '%env-'". And the last few are "yeah,
this was never going to work in a remote environment".
In the few cases where I couldn't think of anything reasonable, I just
marked the test as "UNSUPPORTED: remote_run", a new "feature".
* E101: indentation contains mixed spaces and tabs
* E111: indentation is not a multiple of four
* E128: continuation line under-indented for visual indent
* E302: expected 2 blank lines, found 1
* W191: indentation contains tabs
Before this commit:
```
$ flake8
./utils/rth:34:17: E127 continuation line over-indented for visual indent
./utils/rth:67:27: E127 continuation line over-indented for visual indent
$
```
After this commit:
```
$ flake8
$
```