13c66032d5
It's not necessary to store the tests in a separate repository, since other packages can just reference the tests in this repo. Also update, the other tests to pull from git repos in the rpms namespace.
30 lines
579 B
Bash
Executable File
30 lines
579 B
Bash
Executable File
#!/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
|