Skip to content
Snippets Groups Projects
Commit 442dadd7 authored by Zuzana Baranová's avatar Zuzana Baranová
Browse files

test: Make former divcc tests use dioscc instead.

parent 037cbdc2
No related branches found
No related tags found
No related merge requests found
Showing with 25 additions and 25 deletions
......@@ -36,4 +36,4 @@ add_custom_target( functional
)
add_executable( runner lib/runner.cpp )
add_dependencies( functional divine llvm-utils divcc )
add_dependencies( functional divine llvm-utils divcc dioscc )
......@@ -11,7 +11,7 @@ cat > foo.c <<EOF
int foo(){ return 6; }
EOF
divcc -c foo.c
dioscc -c foo.c
ar r libfoo.a foo.o
nm libfoo.a | grep "T foo"
......@@ -25,11 +25,11 @@ int main()
}
EOF
divcc main.c libfoo.a
dioscc main.c libfoo.a
./a.out
divine check a.out
rm a.out
divcc main.c -L. -lfoo
dioscc main.c -L. -lfoo
./a.out
divine check a.out
......@@ -19,7 +19,7 @@ int main()
}
EOF
divcc -g -c f.c prog.c # create object files
dioscc -g -c f.c prog.c # create object files
if ! [ -s f.o ] || ! [ -s prog.o ]; # make sure they exist
then false;
......@@ -31,7 +31,7 @@ if ! [ -s f.a ];
then false;
fi
divcc prog.o f.a # fully compile
dioscc prog.o f.a # fully compile
if [ -s linked.bc ]; # should NOT spawn linked.bc
then false;
......
......@@ -5,4 +5,4 @@ cmake_minimum_required( VERSION 3.2 )
find_package( Threads REQUIRED )
EOF
cmake -DCMAKE_C_COMPILER=divcc -DCMAKE_CXX_COMPILER=divcc
cmake -DCMAKE_C_COMPILER=dioscc -DCMAKE_CXX_COMPILER=dioscc
......@@ -5,7 +5,7 @@ cat > prog.c <<EOF
int main(){}
EOF
divcc prog.c
dioscc prog.c
if ! [ -s a.out ] || ! [ -x a.out ]; # a.out exists, is non-empty and executable
then false;
......
......@@ -9,7 +9,7 @@ cat > b.c <<EOF
int foo(){}
EOF
divcc -c a.c b.c
dioscc -c a.c b.c
if ! [ -s a.c ] || ! [ -s b.c ];
then false;
......
File moved
......@@ -9,7 +9,7 @@ cat > empty.c <<EOF
// nothing
EOF
divcc -o name prog.c empty.c
dioscc -o name prog.c empty.c
if [ -s a.out ] || ! [ -s name ] || ! [ -x name ];
then false;
......
......@@ -5,7 +5,7 @@ cat > prog.c <<EOF
int main(){}
EOF
divcc -o name prog.c
dioscc -o name prog.c
if [ -s a.out ] || ! [ -s name ] || ! [ -x name ];
then false;
......
File moved
......@@ -2,9 +2,9 @@
. lib/testcase
unxz --version || skip
unxz < $SRC_ROOT/test/divcc/gzip-1.8.tar.xz | tar x
unxz < $SRC_ROOT/test/dioscc/gzip-1.8.tar.xz | tar x
cd gzip-1.8
./configure CC=divcc CFLAGS=-O0
./configure CC=dioscc CFLAGS=-O0
make
echo hello world | ./gzip - > hello.gz
divine check --stdin hello.gz ./gzip -f -d -
......
......@@ -2,9 +2,9 @@
. lib/testcase
unxz --version || skip
unxz < $SRC_ROOT/test/divcc/gzip-1.8.tar.xz | tar x
unxz < $SRC_ROOT/test/dioscc/gzip-1.8.tar.xz | tar x
cd gzip-1.8
./configure CC=divcc CFLAGS=-O1
./configure CC=dioscc CFLAGS=-O1
make
echo hello world | ./gzip - > hello.gz
divine check --stdin hello.gz ./gzip -f -d -
......
......@@ -2,9 +2,9 @@
. lib/testcase
unxz --version || skip
unxz < $SRC_ROOT/test/divcc/gzip-1.8.tar.xz | tar x
unxz < $SRC_ROOT/test/dioscc/gzip-1.8.tar.xz | tar x
cd gzip-1.8
./configure CC=divcc CFLAGS=-O2
./configure CC=dioscc CFLAGS=-O2
make
echo hello world | ./gzip - > hello.gz
divine check --stdin hello.gz ./gzip -f -d -
......
......@@ -6,7 +6,7 @@ int main()
{}
EOF
not divcc prog.c -lxxx 2>&1 | tee file.txt
not dioscc prog.c -lxxx 2>&1 | tee file.txt
grep "unable to find library -lxxx" file.txt
grep "lld failed, not linked" file.txt
......
......@@ -5,7 +5,7 @@ cat > prog.c <<EOF
int main(){}
EOF
divcc -E prog.c | grep main
dioscc -E prog.c | grep main
if [ -s a.out ] || [ -s prog.o ];
then false;
......
......@@ -15,7 +15,7 @@ int main()
}
EOF
divcc prog.c -pthread
dioscc prog.c -pthread
test -s a.out
test -x a.out
......@@ -24,7 +24,7 @@ test -x a.out
divine check a.out
divcc prog.c -lpthread -o lpthr
dioscc prog.c -lpthread -o lpthr
test -s lpthr
test -x lpthr
......
......@@ -3,6 +3,6 @@ test "$TEST_ALLOW_DOWNLOADS" = 1 || skip
name=$(basename $1 .bld)
curl https://divine.fi.muni.cz/test-tarballs/$name.tar.xz | unxz | tar xf -
cd $name
./configure CC=divcc
./configure CC=dioscc
make
. $1
# TAGS: divcc
# TAGS: dioscc
. lib/testcase
cat > strerr_gnu.c <<EOF
......@@ -13,7 +13,7 @@ int main()
}
EOF
divcc -o gnu -D_GNU_SOURCE strerr_gnu.c
dioscc -o gnu -D_GNU_SOURCE strerr_gnu.c
if [ -s a.out ] || ! [ -s gnu ] || ! [ -x gnu ];
then false;
......@@ -38,7 +38,7 @@ int main()
}
EOF
divcc -o nognu -D_XOPEN_SOURCE strerr_nognu.c
dioscc -o nognu -D_XOPEN_SOURCE strerr_nognu.c
if [ -s a.out ] || ! [ -s nognu ] || ! [ -x nognu ];
then false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment