From 73d4dd7e74d25946f82ed2a55f361b13585ebc90 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 25 Sep 2019 02:40:16 +0000 Subject: [PATCH] Pull tests from tests/clang repository --- tests/llvm-toolchain/runtest.sh | 29 ----------------------------- tests/rhbz_1647130/runtest.sh | 10 ---------- tests/rhbz_1657544/from_chars.cpp | 15 --------------- tests/rhbz_1657544/runtest.sh | 6 ------ tests/tests.yml | 8 +++++--- 5 files changed, 5 insertions(+), 63 deletions(-) delete mode 100755 tests/llvm-toolchain/runtest.sh delete mode 100755 tests/rhbz_1647130/runtest.sh delete mode 100644 tests/rhbz_1657544/from_chars.cpp delete mode 100755 tests/rhbz_1657544/runtest.sh diff --git a/tests/llvm-toolchain/runtest.sh b/tests/llvm-toolchain/runtest.sh deleted file mode 100755 index eeebda5..0000000 --- a/tests/llvm-toolchain/runtest.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -# Tests for using a full LLVM toolchain: clang + compiler-rt + libcxx + lld - -set -ex pipefail - -# Test compile a C program. -cat << EOF | \ - clang -fuse-ld=lld -rtlib=compiler-rt -x c - && \ - ./a.out | grep 'Hello World' - -#include -int main(int argc, char **argv) { - printf("Hello World\n"); - return 0; -} -EOF - -# Test compile a C++ program. -cat << EOF | \ - clang++ -x c++ -fuse-ld=lld -rtlib=compiler-rt -stdlib=libc++ - && \ - ./a.out | grep 'Hello World' - -#include -int main(int argc, char **argv) { - std::cout << "Hello World\n"; - return 0; -} -EOF diff --git a/tests/rhbz_1647130/runtest.sh b/tests/rhbz_1647130/runtest.sh deleted file mode 100755 index ab515c7..0000000 --- a/tests/rhbz_1647130/runtest.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -set -e -set -x - -tmp_cpp=`mktemp -t XXXXX.cpp` -tmp_dir=`mktemp -d` -echo 'int main(int argc, char*argv[]) { while(argc--) new int(); return 0; }' > $tmp_cpp -scan-build -o $tmp_dir clang++ -c $tmp_cpp -o /dev/null -(scan-view --no-browser $tmp_dir/* & WPID=$! && sleep 10s && kill $WPID) - diff --git a/tests/rhbz_1657544/from_chars.cpp b/tests/rhbz_1657544/from_chars.cpp deleted file mode 100644 index b76be22..0000000 --- a/tests/rhbz_1657544/from_chars.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include -#include -#include - -using namespace std; - -int main(int argc, char **argv) -{ - size_t r=0; - const char *begin = argv[1]; - const char *end = begin + strlen(begin); - from_chars(begin, end, r); - cout << r << '\n'; - return 0; -} diff --git a/tests/rhbz_1657544/runtest.sh b/tests/rhbz_1657544/runtest.sh deleted file mode 100755 index 758de0b..0000000 --- a/tests/rhbz_1657544/runtest.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -set -e -set -x - -clang++ from_chars.cpp -./a.out 100 | grep 100 diff --git a/tests/tests.yml b/tests/tests.yml index 1ff0b4c..a413089 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -22,12 +22,14 @@ repositories: - repo: "https://src.fedoraproject.org/tests/llvm-test-suite.git" dest: "llvm-test-suite" + - repo: "https://src.fedoraproject.org/tests/clang.git" + dest: "clang" tests: - rhbz#482491: dir: ./ run: echo "int main(){}" | clang -x c - - llvm-test-suite/test-suite - llvm-test-suite/abi-test-suite - - rhbz_1657544 - - rhbz_1647130 - - llvm-toolchain + - clang/rhbz_1657544 + - clang/rhbz_1647130 + - clang/llvm-toolchain