From 442dadd7e8feed5bbc375d76e70d80778ed0b0a4 Mon Sep 17 00:00:00 2001
From: Zuzana Baranova <xbaranov@fi.muni.cz>
Date: Sun, 23 Jun 2019 09:09:01 +0000
Subject: [PATCH] test: Make former divcc tests use dioscc instead.

---
 test/CMakeLists.txt                                 |   2 +-
 test/{divcc => dioscc}/archive-l.sh                 |   6 +++---
 test/{divcc => dioscc}/archive.sh                   |   4 ++--
 test/{divcc => dioscc}/cmake-pthread.sh             |   2 +-
 test/{divcc => dioscc}/compile-full.sh              |   2 +-
 test/{divcc => dioscc}/compile-only.sh              |   2 +-
 test/{divcc => dioscc}/coreutils-8.31.bld           |   0
 test/{divcc => dioscc}/divcc-o-multiple.sh          |   2 +-
 test/{divcc => dioscc}/divcc-o.sh                   |   2 +-
 test/{divcc => dioscc}/gzip-1.8.tar.xz              | Bin
 test/{divcc => dioscc}/gzip-O0.sh                   |   4 ++--
 test/{divcc => dioscc}/gzip-O1.sh                   |   4 ++--
 test/{divcc => dioscc}/gzip-O2.sh                   |   4 ++--
 test/{divcc => dioscc}/nonexistent-lib.sh           |   2 +-
 test/{divcc => dioscc}/preprocess-only.sh           |   2 +-
 test/{divcc => dioscc}/pthread.sh                   |   4 ++--
 test/lib/build                                      |   2 +-
 .../{strerror_r-divcc.sh => strerror_r-dioscc.sh}   |   6 +++---
 18 files changed, 25 insertions(+), 25 deletions(-)
 rename test/{divcc => dioscc}/archive-l.sh (84%)
 rename test/{divcc => dioscc}/archive.sh (87%)
 rename test/{divcc => dioscc}/cmake-pthread.sh (66%)
 rename test/{divcc => dioscc}/compile-full.sh (94%)
 rename test/{divcc => dioscc}/compile-only.sh (94%)
 rename test/{divcc => dioscc}/coreutils-8.31.bld (100%)
 rename test/{divcc => dioscc}/divcc-o-multiple.sh (89%)
 rename test/{divcc => dioscc}/divcc-o.sh (90%)
 rename test/{divcc => dioscc}/gzip-1.8.tar.xz (100%)
 rename test/{divcc => dioscc}/gzip-O0.sh (68%)
 rename test/{divcc => dioscc}/gzip-O1.sh (68%)
 rename test/{divcc => dioscc}/gzip-O2.sh (68%)
 rename test/{divcc => dioscc}/nonexistent-lib.sh (78%)
 rename test/{divcc => dioscc}/preprocess-only.sh (79%)
 rename test/{divcc => dioscc}/pthread.sh (84%)
 rename test/libc/{strerror_r-divcc.sh => strerror_r-dioscc.sh} (87%)

diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 5e1c76aaf..4ce5e0be3 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -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 )
diff --git a/test/divcc/archive-l.sh b/test/dioscc/archive-l.sh
similarity index 84%
rename from test/divcc/archive-l.sh
rename to test/dioscc/archive-l.sh
index 1814b53d7..c2beea3ee 100644
--- a/test/divcc/archive-l.sh
+++ b/test/dioscc/archive-l.sh
@@ -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
diff --git a/test/divcc/archive.sh b/test/dioscc/archive.sh
similarity index 87%
rename from test/divcc/archive.sh
rename to test/dioscc/archive.sh
index 575218629..0d3a88e89 100644
--- a/test/divcc/archive.sh
+++ b/test/dioscc/archive.sh
@@ -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;
diff --git a/test/divcc/cmake-pthread.sh b/test/dioscc/cmake-pthread.sh
similarity index 66%
rename from test/divcc/cmake-pthread.sh
rename to test/dioscc/cmake-pthread.sh
index b50ae311e..a2e345571 100644
--- a/test/divcc/cmake-pthread.sh
+++ b/test/dioscc/cmake-pthread.sh
@@ -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
diff --git a/test/divcc/compile-full.sh b/test/dioscc/compile-full.sh
similarity index 94%
rename from test/divcc/compile-full.sh
rename to test/dioscc/compile-full.sh
index 5de430857..8b85e80ce 100644
--- a/test/divcc/compile-full.sh
+++ b/test/dioscc/compile-full.sh
@@ -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;
diff --git a/test/divcc/compile-only.sh b/test/dioscc/compile-only.sh
similarity index 94%
rename from test/divcc/compile-only.sh
rename to test/dioscc/compile-only.sh
index 5a437a963..6559ca1ce 100644
--- a/test/divcc/compile-only.sh
+++ b/test/dioscc/compile-only.sh
@@ -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;
diff --git a/test/divcc/coreutils-8.31.bld b/test/dioscc/coreutils-8.31.bld
similarity index 100%
rename from test/divcc/coreutils-8.31.bld
rename to test/dioscc/coreutils-8.31.bld
diff --git a/test/divcc/divcc-o-multiple.sh b/test/dioscc/divcc-o-multiple.sh
similarity index 89%
rename from test/divcc/divcc-o-multiple.sh
rename to test/dioscc/divcc-o-multiple.sh
index 9a1931516..becd4161b 100644
--- a/test/divcc/divcc-o-multiple.sh
+++ b/test/dioscc/divcc-o-multiple.sh
@@ -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;
diff --git a/test/divcc/divcc-o.sh b/test/dioscc/divcc-o.sh
similarity index 90%
rename from test/divcc/divcc-o.sh
rename to test/dioscc/divcc-o.sh
index e90b64be5..8c3efb685 100644
--- a/test/divcc/divcc-o.sh
+++ b/test/dioscc/divcc-o.sh
@@ -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;
diff --git a/test/divcc/gzip-1.8.tar.xz b/test/dioscc/gzip-1.8.tar.xz
similarity index 100%
rename from test/divcc/gzip-1.8.tar.xz
rename to test/dioscc/gzip-1.8.tar.xz
diff --git a/test/divcc/gzip-O0.sh b/test/dioscc/gzip-O0.sh
similarity index 68%
rename from test/divcc/gzip-O0.sh
rename to test/dioscc/gzip-O0.sh
index f9a37098f..0908e4685 100644
--- a/test/divcc/gzip-O0.sh
+++ b/test/dioscc/gzip-O0.sh
@@ -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 -
diff --git a/test/divcc/gzip-O1.sh b/test/dioscc/gzip-O1.sh
similarity index 68%
rename from test/divcc/gzip-O1.sh
rename to test/dioscc/gzip-O1.sh
index 2fa73f3da..075bc3bdc 100644
--- a/test/divcc/gzip-O1.sh
+++ b/test/dioscc/gzip-O1.sh
@@ -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 -
diff --git a/test/divcc/gzip-O2.sh b/test/dioscc/gzip-O2.sh
similarity index 68%
rename from test/divcc/gzip-O2.sh
rename to test/dioscc/gzip-O2.sh
index 09832c5be..3aab66255 100644
--- a/test/divcc/gzip-O2.sh
+++ b/test/dioscc/gzip-O2.sh
@@ -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 -
diff --git a/test/divcc/nonexistent-lib.sh b/test/dioscc/nonexistent-lib.sh
similarity index 78%
rename from test/divcc/nonexistent-lib.sh
rename to test/dioscc/nonexistent-lib.sh
index 480305efd..de9ecbef2 100644
--- a/test/divcc/nonexistent-lib.sh
+++ b/test/dioscc/nonexistent-lib.sh
@@ -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
diff --git a/test/divcc/preprocess-only.sh b/test/dioscc/preprocess-only.sh
similarity index 79%
rename from test/divcc/preprocess-only.sh
rename to test/dioscc/preprocess-only.sh
index 92231d9ad..7332f0285 100644
--- a/test/divcc/preprocess-only.sh
+++ b/test/dioscc/preprocess-only.sh
@@ -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;
diff --git a/test/divcc/pthread.sh b/test/dioscc/pthread.sh
similarity index 84%
rename from test/divcc/pthread.sh
rename to test/dioscc/pthread.sh
index 8fc6694d0..494fca49d 100644
--- a/test/divcc/pthread.sh
+++ b/test/dioscc/pthread.sh
@@ -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
diff --git a/test/lib/build b/test/lib/build
index f6f656019..5cc91e594 100644
--- a/test/lib/build
+++ b/test/lib/build
@@ -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
diff --git a/test/libc/strerror_r-divcc.sh b/test/libc/strerror_r-dioscc.sh
similarity index 87%
rename from test/libc/strerror_r-divcc.sh
rename to test/libc/strerror_r-dioscc.sh
index 80308fe59..f6ae40f13 100644
--- a/test/libc/strerror_r-divcc.sh
+++ b/test/libc/strerror_r-dioscc.sh
@@ -1,4 +1,4 @@
-# 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;
-- 
GitLab