Skip to contentSkip to conversation

master - tests: don't change real test output

PATCH David Teigland 2 participants 2 messages Sep 16, 2019

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=df36a8eadfbbfe547cc734259dfc598cb773b59c
Commit:        df36a8eadfbbfe547cc734259dfc598cb773b59c
Parent:        196a9ed59fa65666a1efa26440166ace6206e545
Author:        David Teigland <[email protected]>
AuthorDate:    Thu Sep 12 14:45:13 2019 -0500
Committer:     David Teigland <[email protected]>
CommitterDate: Thu Sep 12 14:45:13 2019 -0500

tests: don't change real test output

---
 test/lib/brick-shelltest.h |   14 --------------
 1 files changed, 0 insertions(+), 14 deletions(-)
test/lib/brick-shelltest.h +0 -14
index 56429c7..b58f3d6 100644
@@ -376,20 +376,6 @@ struct Substitute {
     std::string prefix;
 
     std::string map( std::string line ) {
-        if ( std::string( line, 0, 9 ) == "@TESTDIR=" )
-            testdir = std::string( line, 9, line.length() - 10 ); // skip \n
-        else if ( std::string( line, 0, 8 ) == "@PREFIX=" )
-            prefix = std::string( line, 8, line.length() - 9 );  // skip \n
-        else {
-            size_t off;
-            if (!testdir.empty())
-                while ( (off = line.find( testdir )) != std::string::npos )
-                    line.replace( off, testdir.length(), "@TESTDIR@" );
-
-            if (!prefix.empty())
-                while ( (off = line.find( prefix )) != std::string::npos )
-                    line.replace( off, prefix.length(), "@PREFIX@" );
-        }
         return line;
     }
 };
#1 lore raw

Dne 16. 09. 19 v 18:46 David Teigland napsal(a):

Quoted 10 lines
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=df36a8eadfbbfe547cc734259dfc598cb773b59c
Commit:        df36a8eadfbbfe547cc734259dfc598cb773b59c
Parent:        196a9ed59fa65666a1efa26440166ace6206e545
Author:        David Teigland <[email protected]>
AuthorDate:    Thu Sep 12 14:45:13 2019 -0500
Committer:     David Teigland <[email protected]>
CommitterDate: Thu Sep 12 14:45:13 2019 -0500

tests: don't change real test output

It's much more practical to have unified output then always randomized strings...

But anyway, I'm only giving comments...

Zdenek