]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
auth: add an option to bulk fix the regression tests results 7873/head
authorKees Monshouwer <mind04@monshouwer.org>
Tue, 4 Jun 2019 18:04:52 +0000 (20:04 +0200)
committermind04 <mind04@monshouwer.org>
Tue, 4 Jun 2019 18:16:29 +0000 (20:16 +0200)
(use it wisely)

regression-tests/runtests
regression-tests/start-test-stop

index d20cca75cf38f1bc5a4b4b0c3de5441e69c80222..3060051fc264766ac4334ab3ca8a6e37550797b3 100755 (executable)
@@ -117,6 +117,11 @@ do
                                result="        Failed test $a"
                                echo $testname >> failed_tests
                                failed=$[$failed+1]
+                               if [ "$FIX_TESTS" == "YES" ]
+                               then
+                                       mv -f $a/real_result $expected
+                                       result="$result (fixed)"
+                               fi
                        else
                                result="        Expected failure for reason $reason, test passed $a"
                                echo $testname >> passed_tests
index 6f4fca1c47820d1e994dc74299a15bd80b4f9f72..aec0868634f8118efcf0cbca481bc17f43494ef4 100755 (executable)
@@ -17,6 +17,7 @@ export ZONE2LDAP=${ZONE2LDAP:-${PWD}/../pdns/zone2ldap}
 export PDNSUTIL=${PDNSUTIL:-${PWD}/../pdns/pdnsutil}
 export PDNSCONTROL=${PDNSCONTROL:-${PWD}/../pdns/pdns_control}
 export RESOLVERIP=${RESOLVERIP:-8.8.8.8}
+export FIX_TESTS=${FIX_TESTS:-NO}
 
 
 ALGORITHM=${ALGORITHM:="hmac-md5"}