Further reduce test overhead

llvm-svn: 260198
This commit is contained in:
Xinliang David Li 2016-02-09 05:36:57 +00:00
parent 833571ecb4
commit c2f25cc4cc
1 changed files with 4 additions and 8 deletions

View File

@ -811,7 +811,7 @@ TEST_P(MaybeSparseInstrProfTest, instr_prof_symtab_module_test) {
TEST_P(MaybeSparseInstrProfTest, instr_prof_symtab_compression_test) {
std::vector<std::string> FuncNames1;
std::vector<std::string> FuncNames2;
for (int I = 0; I < 128; I++) {
for (int I = 0; I < 3; I++) {
std::string str;
raw_string_ostream OS(str);
OS << "func_" << I;
@ -838,8 +838,8 @@ TEST_P(MaybeSparseInstrProfTest, instr_prof_symtab_compression_test) {
collectPGOFuncNameStrings(
FuncNames2, (DoCompression && zlib::isAvailable()), FuncNameStrings2);
for (int Padding = 0; Padding < 3; Padding++) {
// Join with paddings:
for (int Padding = 0; Padding < 2; Padding++) {
// Join with paddings :
std::string FuncNameStrings = FuncNameStrings1;
for (int P = 0; P < Padding; P++) {
FuncNameStrings.push_back('\0');
@ -856,11 +856,7 @@ TEST_P(MaybeSparseInstrProfTest, instr_prof_symtab_compression_test) {
ASSERT_EQ(StringRef("func_0"), R);
R = Symtab.getFuncName(IndexedInstrProf::ComputeHash(FuncNames1[1]));
ASSERT_EQ(StringRef("fooooooooooooooo_0"), 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 < 128; I++) {
for (int I = 0; I < 3; I++) {
std::string N[4];
N[0] = FuncNames1[2 * I];
N[1] = FuncNames1[2 * I + 1];