]> granicus.if.org Git - llvm/commitdiff
Revert 374629 "[sancov] Accommodate sancov and coverage report server for use under...
authorVitaly Buka <vitalybuka@google.com>
Sat, 12 Oct 2019 05:23:43 +0000 (05:23 +0000)
committerVitaly Buka <vitalybuka@google.com>
Sat, 12 Oct 2019 05:23:43 +0000 (05:23 +0000)
http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/27650/steps/ninja%20check%201/logs/stdio
http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/31759
http://lab.llvm.org:8011/builders/clang-s390x-linux-lnt/builds/15095
http://lab.llvm.org:8011/builders/clang-ppc64be-linux-multistage/builds/21075
http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/31759

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374636 91177308-0d34-0410-b5e6-96231b3b80d8

test/tools/sancov/blacklist.test
test/tools/sancov/covered_functions.test
test/tools/sancov/merge.test
test/tools/sancov/not_covered_functions.test
test/tools/sancov/print.test
test/tools/sancov/stats.test
test/tools/sancov/symbolize.test
test/tools/sancov/symbolize_noskip_dead_files.test
test/tools/sancov/validation.test
tools/sancov/coverage-report-server.py
tools/sancov/sancov.cpp

index e933c76475df5c6ce262be2091ac413f37eb42c9..53f48534dc955bf714cd6990a908324443b933da 100644 (file)
@@ -1,4 +1,4 @@
-REQUIRES: x86-registered-target
+REQUIRES: x86_64-linux
 RUN: sancov -covered-functions %p/Inputs/test-linux_x86_64 %p/Inputs/test-linux_x86_64.0.sancov | FileCheck %s --check-prefix=ALL
 RUN: sancov -covered-functions -blacklist %p/Inputs/fun_blacklist.txt %p/Inputs/test-linux_x86_64 %p/Inputs/test-linux_x86_64.0.sancov | FileCheck %s
 RUN: sancov -covered-functions -blacklist %p/Inputs/src_blacklist.txt %p/Inputs/test-linux_x86_64 %p/Inputs/test-linux_x86_64.1.sancov | FileCheck --check-prefix=CHECK1 %s
index a2de78894318d6a24b05d4a911808f6cfa299da0..8126049a0ca1d552ea751c4949741fe5b70d96e5 100644 (file)
@@ -1,4 +1,4 @@
-REQUIRES: x86-registered-target
+REQUIRES: x86_64-linux
 RUN: sancov -covered-functions %p/Inputs/test-linux_x86_64 %p/Inputs/test-linux_x86_64.0.sancov | FileCheck %s
 RUN: sancov -covered-functions -strip_path_prefix=Inputs/ %p/Inputs/test-linux_x86_64 %p/Inputs/test-linux_x86_64.0.sancov | FileCheck --check-prefix=STRIP_PATH %s
 RUN: sancov -demangle=0 -covered-functions %p/Inputs/test-linux_x86_64 %p/Inputs/test-linux_x86_64.0.sancov | FileCheck --check-prefix=NO_DEMANGLE %s
index 6c867654583ca4b1a8031e4ae16f51eedfbc63e1..9c5ca9e6244cabfa3a00e0a9afc8410056e7d16a 100644 (file)
@@ -1,4 +1,4 @@
-REQUIRES: x86-registered-target
+REQUIRES: x86_64-linux
 RUN: sancov -merge %p/Inputs/test-linux_x86_64.0.symcov| FileCheck --check-prefix=MERGE1 %s
 RUN: sancov -merge %p/Inputs/test-linux_x86_64.0.symcov %p/Inputs/test-linux_x86_64.1.symcov| FileCheck --check-prefix=MERGE2 %s
 
index 921d88ec87acfeacb2372108a5f54df3ec7a6b0f..4e0e81a52c2c8920abd3dbb6b5914bc8b10f1879 100644 (file)
@@ -1,4 +1,4 @@
-REQUIRES: x86-registered-target
+REQUIRES: x86_64-linux
 RUN: sancov -skip-dead-files=0 -not-covered-functions %p/Inputs/test-linux_x86_64 %p/Inputs/test-linux_x86_64.0.sancov | FileCheck %s
 RUN: sancov -not-covered-functions %p/Inputs/test-linux_x86_64 %p/Inputs/test-linux_x86_64.1.sancov | FileCheck --check-prefix=CHECK1 --allow-empty %s
 
index f0520aead4e9830f32859f824804fd865fd998a0..fe94216b051a2eb4dbd668ef23c8468e0505e6fe 100644 (file)
@@ -1,4 +1,4 @@
-REQUIRES: x86-registered-target
+REQUIRES: x86_64-linux
 RUN: sancov -print %p/Inputs/test-linux_x86_64.0.sancov | FileCheck %s
 
 CHECK: 0x4e132b
index 1c83e93990dba37b958a3149d6a0c22f1567fc26..030d16a9dc6168f720d1cd73459cec12fd2365cd 100644 (file)
@@ -1,4 +1,4 @@
-REQUIRES: x86-registered-target
+REQUIRES: x86_64-linux
 RUN: sancov -print-coverage-stats %p/Inputs/test-linux_x86_64 %p/Inputs/test-linux_x86_64.0.sancov | FileCheck %s
 
 CHECK: all-edges: 8
index 83d29ff489a0fff69c7b4804e7d543a7fdbb22f6..3cc426f919b967cdf91b41a86daf2a12f9bacefa 100644 (file)
@@ -1,6 +1,5 @@
-REQUIRES: x86-registered-target
-RUN: sancov -symbolize -strip_path_prefix="llvm/" %p/Inputs/test-linux_x86_64 %p/Inputs/test-linux_x86_64.0.sancov | FileCheck %s --check-prefixes=CHECK,STRIP
-RUN: sancov -symbolize %p/Inputs/test-linux_x86_64 %p/Inputs/test-linux_x86_64.0.sancov | FileCheck %s --check-prefixes=CHECK,NOSTRIP
+REQUIRES: x86_64-linux
+RUN: sancov -symbolize -strip_path_prefix="llvm/" %p/Inputs/test-linux_x86_64 %p/Inputs/test-linux_x86_64.0.sancov | FileCheck %s
 
 CHECK: {
 CHECK-NEXT:  "covered-points": [
@@ -12,8 +11,7 @@ CHECK-NEXT:    "4e1586"
 CHECK-NEXT:  ],
 CHECK-NEXT:  "binary-hash": "BB3CDD5045AED83906F6ADCC1C4DAF7E2596A6B5",
 CHECK-NEXT:  "point-symbol-info": {
-STRIP-NEXT:    "test/tools/sancov/Inputs/test.cpp": {
-NOSTRIP-NEXT:  "/usr/local/google/home/aizatsky/src/llvm/test/tools/sancov/Inputs/test.cpp": {
+CHECK-NEXT:    "test/tools/sancov/Inputs/test.cpp": {
 CHECK-NEXT:      "bar(std::string)": {
 CHECK-NEXT:        "4e132b": "12:0"
 CHECK-NEXT:      },
index 7371f084390c775b3806c1154d6293f2f6d5de4c..9ddf89cbf56d279668e652bba3a2936b1fe4ac72 100644 (file)
@@ -1,4 +1,4 @@
-REQUIRES: x86-registered-target
+REQUIRES: x86_64-linux
 RUN: sancov -symbolize -skip-dead-files=0 -strip_path_prefix="llvm/" %p/Inputs/test-linux_x86_64 %p/Inputs/test-linux_x86_64.0.sancov | FileCheck %s
 
 CHECK: {
index fdcfd0610f82e7968525179c1ee23c7d471e51fe..437870cf597bfba16ac7538e062dafde21a2d9fb 100644 (file)
@@ -1,4 +1,4 @@
-REQUIRES: x86-registered-target
+REQUIRES: x86_64-linux
 RUN: not sancov -covered-functions %p/Inputs/test-linux_x86_64 2>&1 | FileCheck --check-prefix=NOCFILE %s
 
 NOCFILE: WARNING: No coverage file for {{.*}}test-linux_x86_64
index 5ea978fae642aa848985a6eb17f67cd839745280..251d8f1b77baca358c17d608b33f7d33ac5471c2 100755 (executable)
@@ -32,7 +32,6 @@ import html
 import os
 import string
 import math
-import urllib
 
 INDEX_PAGE_TMPL = """
 <html>
@@ -129,7 +128,6 @@ class ServerHandler(http.server.BaseHTTPRequestHandler):
     src_path = None
 
     def do_GET(self):
-        norm_path = os.path.normpath(urllib.parse.unquote(self.path[1:]))
         if self.path == '/':
             self.send_response(200)
             self.send_header("Content-type", "text/html; charset=utf-8")
@@ -149,8 +147,8 @@ class ServerHandler(http.server.BaseHTTPRequestHandler):
             response = string.Template(INDEX_PAGE_TMPL).safe_substitute(
                 filenames='\n'.join(filelist))
             self.wfile.write(response.encode('UTF-8', 'replace'))
-        elif self.symcov_data.has_file(norm_path):
-            filename = norm_path
+        elif self.symcov_data.has_file(self.path[1:]):
+            filename = self.path[1:]
             filepath = os.path.join(self.src_path, filename) 
             if not os.path.exists(filepath):
                 self.send_response(404)
index 09826ec239b5368cf34934d4e4a2994cc4c210c5..e0cc8a7cf8494f732603da2b8831611d7222e4cd 100644 (file)
@@ -469,7 +469,7 @@ static std::unique_ptr<symbolize::LLVMSymbolizer> createSymbolizer() {
 static std::string normalizeFilename(const std::string &FileName) {
   SmallString<256> S(FileName);
   sys::path::remove_dots(S, /* remove_dot_dot */ true);
-  return stripPathPrefix(sys::path::convert_to_slash(S.str()));
+  return stripPathPrefix(S.str().str());
 }
 
 class Blacklists {