Pull tests from tests/clang repository
This commit is contained in:
parent
d04c1c444a
commit
73d4dd7e74
@ -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<stdio.h>
|
|
||||||
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 <iostream>
|
|
||||||
int main(int argc, char **argv) {
|
|
||||||
std::cout << "Hello World\n";
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
EOF
|
|
@ -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)
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
|||||||
#include <charconv>
|
|
||||||
#include <iostream>
|
|
||||||
#include <cstring>
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
set -e
|
|
||||||
set -x
|
|
||||||
|
|
||||||
clang++ from_chars.cpp
|
|
||||||
./a.out 100 | grep 100
|
|
@ -22,12 +22,14 @@
|
|||||||
repositories:
|
repositories:
|
||||||
- repo: "https://src.fedoraproject.org/tests/llvm-test-suite.git"
|
- repo: "https://src.fedoraproject.org/tests/llvm-test-suite.git"
|
||||||
dest: "llvm-test-suite"
|
dest: "llvm-test-suite"
|
||||||
|
- repo: "https://src.fedoraproject.org/tests/clang.git"
|
||||||
|
dest: "clang"
|
||||||
tests:
|
tests:
|
||||||
- rhbz#482491:
|
- rhbz#482491:
|
||||||
dir: ./
|
dir: ./
|
||||||
run: echo "int main(){}" | clang -x c -
|
run: echo "int main(){}" | clang -x c -
|
||||||
- llvm-test-suite/test-suite
|
- llvm-test-suite/test-suite
|
||||||
- llvm-test-suite/abi-test-suite
|
- llvm-test-suite/abi-test-suite
|
||||||
- rhbz_1657544
|
- clang/rhbz_1657544
|
||||||
- rhbz_1647130
|
- clang/rhbz_1647130
|
||||||
- llvm-toolchain
|
- clang/llvm-toolchain
|
||||||
|
Loading…
Reference in New Issue
Block a user