From 8e799949749288b0dadf5cbf3be7e9adcf7efab3 Mon Sep 17 00:00:00 2001 From: Jenny Tam Date: Sun, 19 Nov 2017 21:32:47 -0800 Subject: [PATCH] Debugging output.py --- appveyor.yml | 2 +- test/functional/output.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 6e9f9be6..fb17c7d6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -179,7 +179,7 @@ test_script: If ($env:SQL_INSTANCE -Match "SQL2016") { "Running phpt tests via OpenCppCoverage..." $ext_dir = ${env:PHP_SDK_DIR} + "\php-" + ${env:PHP_VERSION} + "-src\ext"; - OpenCppCoverage.exe --sources $ext_dir\pdo_sqlsrv --sources $ext_dir\sqlsrv --modules *sqlsrv*.dll --export_type=cobertura:${env:PHP_INSTALL_DIR}\coverage.xml --cover_children --quiet --continue_after_cpp_exception --optimized_build -- .\php.exe .\run-tests.php -P ${env:APPVEYOR_BUILD_FOLDER}\test\functional\ > ${env:APPVEYOR_BUILD_FOLDER}\test\functional\sqlsrvtests.log 2>&1 + OpenCppCoverage.exe --sources $ext_dir\pdo_sqlsrv --sources $ext_dir\sqlsrv --modules *sqlsrv*.dll --export_type=cobertura:.\coverage.xml --cover_children --quiet --continue_after_cpp_exception --optimized_build -- .\php.exe .\run-tests.php -P ${env:APPVEYOR_BUILD_FOLDER}\test\functional\ > ${env:APPVEYOR_BUILD_FOLDER}\test\functional\sqlsrvtests.log 2>&1 type ${env:APPVEYOR_BUILD_FOLDER}\test\functional\sqlsrvtests.log; ls *.xml } Else { diff --git a/test/functional/output.py b/test/functional/output.py index 96caf7f5..f030e7e7 100644 --- a/test/functional/output.py +++ b/test/functional/output.py @@ -38,6 +38,7 @@ def returnCount(var): # path - path of the file. # Output: null def readAndPrint(inputStr, file, path): + print(path) filn = open(path + os.sep + file).readlines() for lines in filn: if inputStr in lines: @@ -50,6 +51,8 @@ def TestFilename(line): terminateChar = os.sep currentPos = 0 firstpos = len(line) * -1 + print(line) + print(firstpos) while True: currentPos = currentPos - 1 # if passed the first pos, stop