<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 5, 2015, at 4:56 PM, Michael Buckley via swift-dev <<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Hi,</div><div class=""><br class=""></div><div class="">I have successfully run the swift test suites by passing the -T flag to utils/build_script, and I am wondering if there is any way to run an individual test by name, or even just run a single file.</div><div class=""><br class=""></div>Forgive me if the answer to this question is already documented somewhere. I have read through all the documentation I could find in the git repository, and checked out the lit documentation on <a href="http://llvm.org/" class="">llvm.org</a>.</div></div></blockquote><div><br class=""></div><div>docs/Testing.rst line 95 shows the way that I use lit to run individual tests or tests under a directory:</div><div><br class=""></div><div> % ${LLVM_SOURCE_ROOT}/utils/lit/lit.py -sv --param swift_site_config=${SWIFT_BUILD_ROOT}/test-iphonesimulator-i386/lit.site.cfg ${SWIFT_SOURCE_ROOT}/test/Parse/</div><div><br class=""></div><div>For example, if you build with build-script -r you should be able to run test/SILPasses/mem2reg.sil with:</div><div><br class=""></div><div><div>../llvm/utils/lit/lit.py -sv --param swift_site_config=../build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/test-macosx-x86_64/lit.site.cfg test/SILPasses/mem2reg.sil</div><div class=""><br class=""></div><div class="">As you can imagine this is quite long so I have an alias set up to provide the initial arguments to lit.py (in particular pointing to the swift_site_config).</div><div class=""><br class=""></div><div class="">Mark</div><div class=""><br class=""></div></div></div></body></html>