[swift-dev] How to run the tests out-of-tree?
Jordan Rose
jordan_rose at apple.com
Thu May 12 11:12:20 CDT 2016
Hi, Karl. I don’t think it would be too hard to handle most of them. The tests are actually pretty standalone: they require the LLVM tool “lit <http://llvm.org/docs/CommandGuide/lit.html>” (in llvm/utils/lit/) and some helper tools from the build directory like “FileCheck” and “not”. To run them, the build system generates a valid lit.site.cfg file from test/lit.site.cfg.in and then points lit.py at that.
That’s really all you need. I regularly run lit by hand just pointing to the directory containing the lit.site.cfg file.
% /Volumes/Data/swift-public/llvm/utils/lit/lit.py -sv /Volumes/Data/swift-public/build/ninja/swift-macosx-x86_64/test-macosx-x86_64/
So if you can come up with a valid lit.site.cfg file and set PATH appropriately, you’ll be most of the way there, and then you can iron out remaining issues later.
Jordan
> On May 12, 2016, at 07:45, Karl via swift-dev <swift-dev at swift.org> wrote:
>
> Hi
>
> So I’ve been working on cross-compiling for ARM, and it seems pretty good - only a bit of refactoring of the build script really needed. It’s a popular request, the lack of which is hindering lots of people and businesses who would like to experiment with swift on their ARM-based devices.
>
> The thing that’s really missing before I can propose merging these changes is running the in-tree tests (swift/tests/ folder) to validate the products. I basically want to copy that folder in to a package and run it on the target device, but I’m not really sure how to do that with lit. I’ve built the unit test binaries (the ones which statically link against the runtime), and those obviously are easy enough to package and script for out-of-tree use.
>
> Can anybody help with this?
>
> Thanks
>
> Karl
> _______________________________________________
> swift-dev mailing list
> swift-dev at swift.org
> https://lists.swift.org/mailman/listinfo/swift-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20160512/7edddc2f/attachment.html>
More information about the swift-dev
mailing list