[llvm] r259285 - Further reduce test time

Xinliang David Li via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 29 17:37:33 PST 2016


Author: davidxl
Date: Fri Jan 29 19:37:32 2016
New Revision: 259285

URL: http://llvm.org/viewvc/llvm-project?rev=259285&view=rev
Log:
Further reduce test time

Modified:
    llvm/trunk/unittests/ProfileData/InstrProfTest.cpp

Modified: llvm/trunk/unittests/ProfileData/InstrProfTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ProfileData/InstrProfTest.cpp?rev=259285&r1=259284&r2=259285&view=diff
==============================================================================
--- llvm/trunk/unittests/ProfileData/InstrProfTest.cpp (original)
+++ llvm/trunk/unittests/ProfileData/InstrProfTest.cpp Fri Jan 29 19:37:32 2016
@@ -713,7 +713,7 @@ TEST_P(MaybeSparseInstrProfTest, instr_p
 TEST_P(MaybeSparseInstrProfTest, instr_prof_symtab_compression_test) {
   std::vector<std::string> FuncNames1;
   std::vector<std::string> FuncNames2;
-  for (int I = 0; I < 10 * 1024; I++) {
+  for (int I = 0; I < 128; I++) {
     std::string str;
     raw_string_ostream OS(str);
     OS << "func_" << I;
@@ -758,15 +758,11 @@ TEST_P(MaybeSparseInstrProfTest, instr_p
       ASSERT_EQ(StringRef("func_0"), R);
       R = Symtab.getFuncName(IndexedInstrProf::ComputeHash(FuncNames1[1]));
       ASSERT_EQ(StringRef("fooooooooooooooo_0"), R);
-      R = Symtab.getFuncName(IndexedInstrProf::ComputeHash(FuncNames1[998]));
-      ASSERT_EQ(StringRef("func_499"), R);
-      R = Symtab.getFuncName(IndexedInstrProf::ComputeHash(FuncNames1[999]));
-      ASSERT_EQ(StringRef("fooooooooooooooo_499"), R);
       R = Symtab.getFuncName(IndexedInstrProf::ComputeHash(FuncNames2[100]));
       ASSERT_EQ(StringRef("BAR_50"), R);
       R = Symtab.getFuncName(IndexedInstrProf::ComputeHash(FuncNames2[101]));
       ASSERT_EQ(StringRef("BlahblahBlahblahBar_50"), R);
-      for (int I = 0; I < 10 * 1024; I++) {
+      for (int I = 0; I < 128; I++) {
         std::string N[4];
         N[0] = FuncNames1[2 * I];
         N[1] = FuncNames1[2 * I + 1];




More information about the llvm-commits mailing list