[TSan] Delete legacy test_output.sh script.
authorAlexey Samsonov <vonosmas@gmail.com>
Mon, 7 Dec 2015 19:40:33 +0000 (19:40 +0000)
committerAlexey Samsonov <vonosmas@gmail.com>
Mon, 7 Dec 2015 19:40:33 +0000 (19:40 +0000)
This script is superseded by lit test suite integrated into CMake
for quite a while now. It doesn't support many tests, and require
custom hacks for a few other.

llvm-svn: 254932

compiler-rt/lib/tsan/Makefile.old
compiler-rt/test/tsan/dl_iterate_phdr.cc
compiler-rt/test/tsan/dlclose.cc
compiler-rt/test/tsan/test_output.sh [deleted file]

index a99abdc..72b472d 100644 (file)
@@ -4,7 +4,6 @@ CXXFLAGS = -std=c++11 -fPIE -fno-rtti -g -Wall -Werror \
                                         -DGTEST_HAS_RTTI=0 -DSANITIZER_DEBUG=$(DEBUG) \
                                         -DTSAN_CONTAINS_UBSAN=0
 CLANG=clang
-FILECHECK=FileCheck
 # Silence warnings that Clang produces for gtest code.
 # Use -Wno-attributes so that gcc doesn't complain about unknown warning types.
 CXXFLAGS += -Wno-attributes
@@ -34,7 +33,6 @@ RTL_TEST_OBJ=$(patsubst %.cc,%.o,$(RTL_TEST_SRC))
 UNIT_TEST_SRC=$(wildcard tests/unit/*_test.cc)
 UNIT_TEST_OBJ=$(patsubst %.cc,%.o,$(UNIT_TEST_SRC))
 UNIT_TEST_HDR=$(wildcard rtl/*.h) $(wildcard ../sanitizer_common/*.h)
-LIT_TESTS_PATH=../../test/tsan
 
 INCLUDES=-Irtl -I.. -I../../include $(GTEST_INCLUDE)
 
@@ -64,7 +62,6 @@ test: libtsan tsan_test
 
 run: all
        (ulimit -s 8192; ./tsan_test)
-       CC=$(CLANG) CXX=$(CLANG)++ FILECHECK=$(FILECHECK) $(LIT_TESTS_PATH)/test_output.sh
 
 presubmit:
        ../sanitizer_common/scripts/check_lint.sh
index 9ecfe39..b9ce615 100644 (file)
@@ -1,8 +1,6 @@
 // RUN: %clangxx_tsan -O1 %s -DBUILD_SO -fPIC -shared -o %t-so.so
 // RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
 
-// If we mention TSAN_OPTIONS, the test won't run from test_output.sh script.
-
 // dl_iterate_phdr doesn't exist on OS X.
 // UNSUPPORTED: darwin
 
index a930b91..d497fd7 100644 (file)
@@ -1,8 +1,6 @@
 // RUN: %clangxx_tsan -O1 %s -DBUILD_SO -fPIC -shared -o %t-so.so
 // RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
 
-// If we mention TSAN_OPTIONS, the test won't run from test_output.sh script.
-
 // Test case for
 // https://github.com/google/sanitizers/issues/487
 
diff --git a/compiler-rt/test/tsan/test_output.sh b/compiler-rt/test/tsan/test_output.sh
deleted file mode 100755 (executable)
index 07fcab7..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/bin/bash
-
-ulimit -s 8192
-set -e # fail on any error
-
-HERE=$(dirname $0)
-TSAN_DIR=$(dirname $0)/../../lib/tsan
-
-# Assume clang and clang++ are in path.
-: ${CC:=clang}
-: ${CXX:=clang++}
-: ${FILECHECK:=FileCheck}
-
-# TODO: add testing for all of -O0...-O3
-CFLAGS="-fsanitize=thread -O2 -g -Wall"
-LDFLAGS="-pthread -ldl -lrt -lm -Wl,--whole-archive $TSAN_DIR/rtl/libtsan.a -Wl,--no-whole-archive"
-
-test_file() {
-  SRC=$1
-  COMPILER=$2
-  echo ----- TESTING $(basename $1)
-  OBJ=$SRC.o
-  EXE=$SRC.exe
-  $COMPILER $SRC $CFLAGS -c -o $OBJ
-  $COMPILER $OBJ $LDFLAGS -o $EXE
-  RES=$($EXE 2>&1 || true)
-  printf "%s\n" "$RES" | $FILECHECK $SRC
-  if [ "$3" == "" ]; then
-    rm -f $EXE $OBJ
-  fi
-}
-
-if [ "$1" == "" ]; then
-  for c in $HERE/*.{c,cc}; do
-    if [[ $c == */failing_* ]]; then
-      echo SKIPPING FAILING TEST $c
-      continue
-    fi
-    if [[ $c == */load_shared_lib.cc ]]; then
-      echo TEST $c is not supported
-      continue
-    fi
-    if [[ $c == */*blacklist*.cc ]]; then
-      echo TEST $c is not supported
-      continue
-    fi
-    if [ "`grep "TSAN_OPTIONS" $c`" ]; then
-      echo SKIPPING $c -- requires TSAN_OPTIONS
-      continue
-    fi
-    if [ "`grep "env_tsan_opts" $c`" ]; then
-      echo SKIPPING $c -- requires TSAN_OPTIONS
-      continue
-    fi
-    if [ "`grep "XFAIL" $c`" ]; then
-      echo SKIPPING $c -- has XFAIL
-      continue
-    fi
-    COMPILER=$CXX
-    case $c in
-      *.c) COMPILER=$CC
-    esac
-    test_file $c $COMPILER &
-  done
-  for job in `jobs -p`; do
-    wait $job || exit 1
-  done
-else
-  test_file $HERE/$1 $CXX "DUMP"
-fi