Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libcxx] Allow use of ShTest in libc++ tests along with other changes.
Summary: This patch allows the use of LIT's ShTest format in the libc++ test suite. ShTests have the suffix '.sh.cpp'. It also introduces a series of other changes. These changes are: - More functionality including parsing test metadata has been moved into LIT. - LibcxxTestFormat now supports multi-part suffixes. - the `CXXCompiler` functionality has been used to shrink the size of LibcxxTestFormat. - The recursive loading of the site config has been turned into `libcxx.test.config.loadSiteConfig` so it can be used with libc++abi. - Temporary files are now created in the build directory of libc++. This follows how it is down in ShTest. - `not.py` was added as a utility executable that mirrors the functionality of LLVM's `not` executable. - The first ShTest test was added under test/libcxx/double_include.sh.cpp Reviewers: jroelofs, danalbert Reviewed By: danalbert Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D7073 llvm-svn: 226844
- Loading branch information
Showing
12 changed files
with
543 additions
and
222 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
// -*- C++ -*- | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// The LLVM Compiler Infrastructure | ||
// | ||
// This file is dual licensed under the MIT and the University of Illinois Open | ||
// Source Licenses. See LICENSE.TXT for details. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
// Test that we can include each header in two TU's and link them together. | ||
|
||
// RUN: %cxx -c %s -o %t.first.o %flags %compile_flags | ||
// RUN: %cxx -c %s -o %t.second.o -DWITH_MAIN %flags %compile_flags | ||
// RUN: %cxx -o %t.exe %t.first.o %t.second.o %flags %link_flags | ||
// RUN: %run | ||
|
||
#include <algorithm> | ||
#include <array> | ||
#include <bitset> | ||
#include <cassert> | ||
#include <ccomplex> | ||
#include <cctype> | ||
#include <cerrno> | ||
#include <cfenv> | ||
#include <cfloat> | ||
#include <chrono> | ||
#include <cinttypes> | ||
#include <ciso646> | ||
#include <climits> | ||
#include <clocale> | ||
#include <cmath> | ||
#include <codecvt> | ||
#include <complex> | ||
#include <complex.h> | ||
#include <condition_variable> | ||
#include <csetjmp> | ||
#include <csignal> | ||
#include <cstdarg> | ||
#include <cstdbool> | ||
#include <cstddef> | ||
#include <cstdint> | ||
#include <cstdio> | ||
#include <cstdlib> | ||
#include <cstring> | ||
#include <ctgmath> | ||
#include <ctime> | ||
#include <cwchar> | ||
#include <cwctype> | ||
#include <deque> | ||
#include <exception> | ||
#include <experimental/dynarray> | ||
#include <experimental/optional> | ||
#include <experimental/string_view> | ||
#include <experimental/type_traits> | ||
#include <experimental/utility> | ||
#include <ext/hash_map> | ||
#include <ext/hash_set> | ||
#include <forward_list> | ||
#include <fstream> | ||
#include <functional> | ||
#include <initializer_list> | ||
#include <iomanip> | ||
#include <ios> | ||
#include <iosfwd> | ||
#include <iostream> | ||
#include <istream> | ||
#include <iterator> | ||
#include <limits> | ||
#include <list> | ||
#include <locale> | ||
#include <map> | ||
#include <memory> | ||
#include <new> | ||
#include <numeric> | ||
#include <ostream> | ||
#include <queue> | ||
#include <random> | ||
#include <ratio> | ||
#include <regex> | ||
#include <scoped_allocator> | ||
#include <set> | ||
#include <sstream> | ||
#include <stack> | ||
#include <stdexcept> | ||
#include <streambuf> | ||
#include <string> | ||
#include <strstream> | ||
#include <system_error> | ||
#include <tgmath.h> | ||
#include <tuple> | ||
#include <typeindex> | ||
#include <typeinfo> | ||
#include <type_traits> | ||
#include <unordered_map> | ||
#include <unordered_set> | ||
#include <utility> | ||
#include <valarray> | ||
#include <vector> | ||
|
||
#ifndef _LIBCPP_HAS_NO_THREADS | ||
#include <atomic> | ||
#include <future> | ||
#include <mutex> | ||
#include <shared_mutex> | ||
#include <thread> | ||
#endif | ||
|
||
#if defined(WITH_MAIN) | ||
int main() {} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// -*- C++ -*- | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// The LLVM Compiler Infrastructure | ||
// | ||
// This file is dual licensed under the MIT and the University of Illinois Open | ||
// Source Licenses. See LICENSE.TXT for details. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
// RUN: %build | ||
// RUN: not %run | ||
|
||
int main() | ||
{ | ||
return 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// -*- C++ -*- | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// The LLVM Compiler Infrastructure | ||
// | ||
// This file is dual licensed under the MIT and the University of Illinois Open | ||
// Source Licenses. See LICENSE.TXT for details. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#error This test should not compile. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// -*- C++ -*- | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// The LLVM Compiler Infrastructure | ||
// | ||
// This file is dual licensed under the MIT and the University of Illinois Open | ||
// Source Licenses. See LICENSE.TXT for details. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
int main() | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// -*- C++ -*- | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// The LLVM Compiler Infrastructure | ||
// | ||
// This file is dual licensed under the MIT and the University of Illinois Open | ||
// Source Licenses. See LICENSE.TXT for details. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
// RUN: %build | ||
// RUN: %run | ||
|
||
int main() | ||
{ | ||
} |
Oops, something went wrong.