Commit Graph

5 Commits

Author SHA1 Message Date
Daniel Duan
3dfc40898c [NFC] Remove Python 2 imports from __future__ (#42086)
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.
2022-04-13 14:01:30 -07:00
Daniel Rodríguez Troitiño
2a7a3eb436 [windows] Use extended length paths for os.walk invocation.
In the Windows VS 2017 CI machines, the path for certain tests end up
being very long. rewrite-module-triples.py was aware and was using
extended length paths for the copy and remove operations in Windows
but it was not using it for the os.walk invocation, so when a folder
that was longer than MAX_PATH was encountered, the walk stopped
drilling into it, missing some module-triple-here substitutions and
making some test fail.

The changes remove the special treatment of the copy and remove
operations and move it into os.walk, which carries the prefix to
every path.

This should fix the problems seen in the SourceKit test in the
Windows VS 2017 machine:

- SourceKit/InterfaceGen/gen_swift_module_cross_import_common.swift
- SourceKit/DocSupport/doc_cross_import_common.swift
- SourceKit/CursorInfo/cursor_info_cross_import_common_case.swift

PD: Misc/stats_dir_profiler.swift is something else. It seems as if
an glob was not being expanded by lit for some reason.
2020-10-10 13:34:24 -07:00
Nathan Hawes
e311480a17 [test] Support long paths on windows in more places in rewrite-module-triples.py 2020-04-23 15:55:36 -07:00
Saleem Abdulrasool
f46492f7a4 test: support long paths in rewrite-module-triples
The path that the tests are using here are extremely long, and can
easily exceed the 261 character limit on Windows.  Apply some
workarounds to support long paths.
2020-04-08 21:15:34 -07:00
Brent Royal-Gordon
0ab823801c Test cross-import overlays 2020-02-18 11:08:36 -08:00