From 0cbecb56fbdca4ac8c254bd122fce9037b1372f1 Mon Sep 17 00:00:00 2001 From: Yuchen Wu Date: Tue, 12 Nov 2013 05:57:06 +0000 Subject: [PATCH] Revert "Added basic unit test for llvm-cov." This reverts commit r194451. Not sure why the tests are failing on the buildbot. They run fine on my local machine. Could it possibly be because of the endianness of the architectures? The GCNO and GCDA files are little-endian encoded, and llvm-cov expects it to remain that way. Is this a safe assumption? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194454 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/tools/llvm-cov/Inputs/README | 7 -- test/tools/llvm-cov/Inputs/test.cpp | 77 --------------------- test/tools/llvm-cov/Inputs/test.cpp.gcov | 82 ----------------------- test/tools/llvm-cov/Inputs/test.gcda | Bin 824 -> 0 bytes test/tools/llvm-cov/Inputs/test.gcno | Bin 3112 -> 0 bytes test/tools/llvm-cov/lit.local.cfg | 1 - test/tools/llvm-cov/llvm-cov.test | 2 - 7 files changed, 169 deletions(-) delete mode 100644 test/tools/llvm-cov/Inputs/README delete mode 100644 test/tools/llvm-cov/Inputs/test.cpp delete mode 100644 test/tools/llvm-cov/Inputs/test.cpp.gcov delete mode 100644 test/tools/llvm-cov/Inputs/test.gcda delete mode 100644 test/tools/llvm-cov/Inputs/test.gcno delete mode 100644 test/tools/llvm-cov/lit.local.cfg delete mode 100644 test/tools/llvm-cov/llvm-cov.test diff --git a/test/tools/llvm-cov/Inputs/README b/test/tools/llvm-cov/Inputs/README deleted file mode 100644 index 35c489e08c1..00000000000 --- a/test/tools/llvm-cov/Inputs/README +++ /dev/null @@ -1,7 +0,0 @@ -These inputs were pre-generated to allow for easier testing of llvm-cov. - -test.gcno and test.gcda were create by running the latest version of clang: - clang++ -g -ftest-coverage -fprofile-arcs test.cpp - -test.cpp.gcov was created by running gcov 4.2.1: - gcov test.cpp diff --git a/test/tools/llvm-cov/Inputs/test.cpp b/test/tools/llvm-cov/Inputs/test.cpp deleted file mode 100644 index 07bc3f294c5..00000000000 --- a/test/tools/llvm-cov/Inputs/test.cpp +++ /dev/null @@ -1,77 +0,0 @@ -#include - -bool on = false; -int len = 42; -double grid[10][10] = {0}; -const char * hello = "world"; -const char * world = "hello"; - -struct A { - virtual void B(); -}; - -void A::B() {} - -void useless() {} - -double more_useless() { - return 0; -} - -int foo() { - on = true; - return 3; -} - -int bar() { - len--; - return foo() + 45; -} - -void assign(int ii, int jj) { - grid[ii][jj] = (ii+1) * (jj+1); -} - -void initialize_grid() { - for (int ii = 0; ii < 2; ii++) - for (int jj = 0; jj < 2; jj++) - assign(ii, jj); -} - -int main() { - initialize_grid(); - - int a = 2; - on = rand() % 2; - if (on) { - foo(); - ++a; - } else { - bar(); - a += rand(); - } - - for (int ii = 0; ii < 10; ++ii) { - switch (rand() % 5) { - case 0: - a += rand(); - break; - case 1: - case 2: - a += rand() / rand(); - break; - case 3: - a -= rand(); - break; - default: - a = -1; - } - } - - A thing; - for (uint64_t ii = 0; ii < 4294967296; ++ii) - thing.B(); - - return a + 8 + grid[2][3] + len; - return more_useless(); -} diff --git a/test/tools/llvm-cov/Inputs/test.cpp.gcov b/test/tools/llvm-cov/Inputs/test.cpp.gcov deleted file mode 100644 index a3dacc269ea..00000000000 --- a/test/tools/llvm-cov/Inputs/test.cpp.gcov +++ /dev/null @@ -1,82 +0,0 @@ - -: 0:Source:test.cpp - -: 0:Graph:test.gcno - -: 0:Data:test.gcda - -: 0:Runs:2 - -: 0:Programs:1 - -: 1:#include - -: 2: - -: 3:bool on = false; - -: 4:int len = 42; - -: 5:double grid[10][10] = {0}; - -: 6:const char * hello = "world"; - -: 7:const char * world = "hello"; - -: 8: - 4: 9:struct A { - -: 10: virtual void B(); - -: 11:}; - -: 12: -8589934592: 13:void A::B() {} - -: 14: - #####: 15:void useless() {} - -: 16: - -: 17:double more_useless() { - #####: 18: return 0; - -: 19:} - -: 20: - -: 21:int foo() { - 2: 22: on = true; - 2: 23: return 3; - -: 24:} - -: 25: - -: 26:int bar() { - #####: 27: len--; - #####: 28: return foo() + 45; - -: 29:} - -: 30: - 8: 31:void assign(int ii, int jj) { - 8: 32: grid[ii][jj] = (ii+1) * (jj+1); - 8: 33:} - -: 34: - -: 35:void initialize_grid() { - 12: 36: for (int ii = 0; ii < 2; ii++) - 24: 37: for (int jj = 0; jj < 2; jj++) - 12: 38: assign(ii, jj); - 2: 39:} - -: 40: - -: 41:int main() { - 2: 42: initialize_grid(); - -: 43: - 2: 44: int a = 2; - 2: 45: on = rand() % 2; - 2: 46: if (on) { - 2: 47: foo(); - 2: 48: ++a; - 2: 49: } else { - #####: 50: bar(); - #####: 51: a += rand(); - -: 52: } - -: 53: - 44: 54: for (int ii = 0; ii < 10; ++ii) { - 20: 55: switch (rand() % 5) { - -: 56: case 0: - 4: 57: a += rand(); - 4: 58: break; - -: 59: case 1: - -: 60: case 2: - 2: 61: a += rand() / rand(); - 2: 62: break; - -: 63: case 3: - 6: 64: a -= rand(); - 6: 65: break; - -: 66: default: - 8: 67: a = -1; - 8: 68: } - 20: 69: } - -: 70: - 2: 71: A thing; -17179869188: 72: for (uint64_t ii = 0; ii < 4294967296; ++ii) -8589934592: 73: thing.B(); - -: 74: - 2: 75: return a + 8 + grid[2][3] + len; - -: 76: return more_useless(); - -: 77:} diff --git a/test/tools/llvm-cov/Inputs/test.gcda b/test/tools/llvm-cov/Inputs/test.gcda deleted file mode 100644 index 23d03bdd1fd2e4da1ed7ea957db0477b88c0eeda..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 824 zcmZ`%%TB{E5R56$JK`faHKCLZtH=fY!-uip_v0D#l#+t>R30E|-_0;;L&dLte&~TP|J*od z+s;~H!u*&yLS0F~Z-iauzqg(Jv}R*}8r=?d6+V^p-bkHurSrgxIlc2d=UJzpSort6 zfSCaN*4WM`a`rTGArEWP>j~!9QN%nyn;xw5{qvc~v!A})*$+R&d47QR_d~zG|M9u} b_dg~+UXMEhMtyZmzoQoV#0P1P-;~$`bIdZ) diff --git a/test/tools/llvm-cov/Inputs/test.gcno b/test/tools/llvm-cov/Inputs/test.gcno deleted file mode 100644 index 6162604e7449ce85feb8bb6cd6438556c21ab1ee..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3112 zcmcguYira%6is~Bw}KT^Q1OLDYqQlB1;sT66{{cpuwTMj;}U3h%VzBdf4%q2%}J&= zqXa7s%=_G%lY7rhGMjEsRt9TNKYiKSilQh!BMr+@8RVnS$uN17?aLVRMNutQxA*pd zIfo`1#z$PwCXInZiM5k9i~->=aeC-{Ekk`e`}f-S}R| zWt@+a!R~Bc+#o(J9b*bk`Dp$7Y}Sp%6$kGZ3;1NQd0m!`tK8Jy zaX415)f~Q#=Uooh9Om#Gu8W@=_4De^=>oYxQC)0|tE!w#%d(@3n-0~Fht<5Varn6< z^|tfZH1T;Eo~WnjMIX<~X}KuJJLS(JpUlf|I5Hhxcbv`8#nTOYHK8+=#)t*Z33Ym^ z@uhgIQ#Vnhc+8nc^2Z+68DFkp?)$(Pb|- z62dYD7JDz?m+#XD%UD_L{eWM_&SFCx7<-Ei`DLsvHWUYHz+xX9;2Syp(Jx}RJ1(by zSi6VLZWx<8$*ullzHab{ zA8;rZzoE-@t9J%t*au6ESnQ_pi+oWl7W-WGUIg&elEuFi?5hBtnzQ)Vf*l6%)Ud^; zf_-c7z6LEm3t*{Di?#7aT&Nw3eJ6YG1HP$6iw|L`bBp~D@JroWY{)Oqjm3UE;8*{J o{k*t;;WP>U3u`|5{ckXLc%0?n@5#11V_XAPISl?M2hfau0S%DaAOHXW diff --git a/test/tools/llvm-cov/lit.local.cfg b/test/tools/llvm-cov/lit.local.cfg deleted file mode 100644 index df9b335dd13..00000000000 --- a/test/tools/llvm-cov/lit.local.cfg +++ /dev/null @@ -1 +0,0 @@ -config.suffixes = ['.test'] diff --git a/test/tools/llvm-cov/llvm-cov.test b/test/tools/llvm-cov/llvm-cov.test deleted file mode 100644 index 049c9b9fe61..00000000000 --- a/test/tools/llvm-cov/llvm-cov.test +++ /dev/null @@ -1,2 +0,0 @@ -RUN: cd %p/Inputs && llvm-cov -gcno=test.gcno -gcda=test.gcda \ -RUN: | diff test.cpp.gcov - -- 2.34.1