[compiler-rt] r254932 - [TSan] Delete legacy test_output.sh script.

Alexey Samsonov via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 7 11:40:34 PST 2015


Author: samsonov
Date: Mon Dec  7 13:40:33 2015
New Revision: 254932

URL: http://llvm.org/viewvc/llvm-project?rev=254932&view=rev
Log:
[TSan] Delete legacy test_output.sh script.

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.

Removed:
    compiler-rt/trunk/test/tsan/test_output.sh
Modified:
    compiler-rt/trunk/lib/tsan/Makefile.old
    compiler-rt/trunk/test/tsan/dl_iterate_phdr.cc
    compiler-rt/trunk/test/tsan/dlclose.cc

Modified: compiler-rt/trunk/lib/tsan/Makefile.old
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/Makefile.old?rev=254932&r1=254931&r2=254932&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/Makefile.old (original)
+++ compiler-rt/trunk/lib/tsan/Makefile.old Mon Dec  7 13:40:33 2015
@@ -4,7 +4,6 @@ CXXFLAGS = -std=c++11 -fPIE -fno-rtti -g
 					 -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_T
 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

Modified: compiler-rt/trunk/test/tsan/dl_iterate_phdr.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/dl_iterate_phdr.cc?rev=254932&r1=254931&r2=254932&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/dl_iterate_phdr.cc (original)
+++ compiler-rt/trunk/test/tsan/dl_iterate_phdr.cc Mon Dec  7 13:40:33 2015
@@ -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
 

Modified: compiler-rt/trunk/test/tsan/dlclose.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/dlclose.cc?rev=254932&r1=254931&r2=254932&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/dlclose.cc (original)
+++ compiler-rt/trunk/test/tsan/dlclose.cc Mon Dec  7 13:40:33 2015
@@ -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
 

Removed: compiler-rt/trunk/test/tsan/test_output.sh
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/test_output.sh?rev=254931&view=auto
==============================================================================
--- compiler-rt/trunk/test/tsan/test_output.sh (original)
+++ compiler-rt/trunk/test/tsan/test_output.sh (removed)
@@ -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




More information about the llvm-commits mailing list