diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /utils/source_builder/RunTestScripts.py | |
| download | archived-source-engine-2018-hl2-src-3bf9df6b2785fa6d951086978a3e66f49427166a.tar.xz archived-source-engine-2018-hl2-src-3bf9df6b2785fa6d951086978a3e66f49427166a.zip | |
Diffstat (limited to 'utils/source_builder/RunTestScripts.py')
| -rw-r--r-- | utils/source_builder/RunTestScripts.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/utils/source_builder/RunTestScripts.py b/utils/source_builder/RunTestScripts.py new file mode 100644 index 0000000..a7f7b49 --- /dev/null +++ b/utils/source_builder/RunTestScripts.py @@ -0,0 +1,32 @@ + +import sys, os, string, re, time, smtplib, getopt, P4, SystemHelpers + +def RunResultingTestFiles(listTestFiles, szErrorResults ): + while len(listTestFiles): + szFilename = listTestFiles.pop() + os.system( szFilename ) + szErrorResult = os.popen( "type errors.txt" ).read() + if szErrorResult: + szErrorResult = "Script failed: " + szFilename + "\n" + szErrorResult + os.remove("errors.txt") + szErrorResults += szErrorResult + return szErrorResults + + +if __name__ == '__main__': + szErrorResults = "" + SystemHelpers.ChangeDir("\\src\\unittests\\autotestscripts\\") + os.environ['PATH'] += os.pathsep + "d:\\main\\src\\devtools\\bin\\" + \ + os.pathsep + "d:\\main\\game\\bin\\" + listTestFiles = SystemHelpers.ListFiles(".py") + szErrorResults += RunResultingTestFiles(listTestFiles, szErrorResults) + listTestFiles = SystemHelpers.ListFiles(".cmd") + szErrorResults += RunResultingTestFiles(listTestFiles, szErrorResults) + listTestFiles = SystemHelpers.ListFiles(".bat") + szErrorResults += RunResultingTestFiles(listTestFiles, szErrorResults) + listTestFiles = SystemHelpers.ListFiles(".pl") + szErrorResults += RunResultingTestFiles(listTestFiles, szErrorResults) + + + print szErrorResults + |