[med-svn] [Git][med-team/pll-modules][master] 2 commits: Some additions to 2to3.patch
Pranav Ballaney
gitlab at salsa.debian.org
Mon Jun 8 22:23:07 BST 2020
Pranav Ballaney pushed to branch master at Debian Med / pll-modules
Commits:
810c5dad by Pranav Ballaney at 2020-06-09T02:51:44+05:30
Some additions to 2to3.patch
- - - - -
b7934483 by Pranav Ballaney at 2020-06-09T02:52:23+05:30
Patch to test build time tests
- - - - -
3 changed files:
- debian/patches/2to3.patch
- debian/patches/series
- + debian/patches/test.patch
Changes:
=====================================
debian/patches/2to3.patch
=====================================
@@ -2,15 +2,24 @@ Description: apply 2to3 patch on test/runtest.py
Author: Shayan Doust <hello at shayandoust.me>
Last-Update: 2020-06-01
---
---- pll-modules.orig/test/runtest.py
-+++ pll-modules/test/runtest.py
+--- a/test/runtest.py
++++ b/test/runtest.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright (C) 2015 Diego Darriba
#
-@@ -252,7 +252,7 @@
+@@ -134,7 +134,7 @@ def testFAIL():
+
+ def diffOutput(filename):
+ p2 = Popen(["diff", "tmp", filename], stdout=PIPE)
+- output = p2.communicate()[0]
++ output = p2.communicate()[0].decode('UTF-8')
+ return output
+
+ def runSpeedTest(files):
+@@ -252,7 +252,7 @@ def runSpeedTest(files):
success_count = success_count + result_ok*memory_ok
@@ -19,7 +28,7 @@ Last-Update: 2020-06-01
fancyprint("yellow", "{:<80}"
.format(" "),True)
-@@ -285,7 +285,7 @@
+@@ -285,7 +285,7 @@ def runValidation(files):
typestr += "C"
fancyprint("bluebg", "{:<80}"
@@ -28,7 +37,7 @@ Last-Update: 2020-06-01
# Process each test case
fancyprint("yellow", "{:<7} {:<8} {:<18} {:>11} Result {:<17}"
-@@ -329,7 +329,7 @@
+@@ -329,7 +329,7 @@ def runValidation(files):
if skipOutput == "":
testSKIP()
@@ -37,7 +46,7 @@ Last-Update: 2020-06-01
result_ok = 1
memory_ok = 1
else:
-@@ -341,7 +341,7 @@
+@@ -341,7 +341,7 @@ def runValidation(files):
os.remove("tmperr")
else:
testFAIL()
@@ -46,7 +55,16 @@ Last-Update: 2020-06-01
call(["mv", "tmp", "result/"+filename+"_"+typestr+"_"+nowstr])
call(["mv", "tmperr", "result/"+filename+"_"+typestr+"_"+nowstr+".err"])
continue
-@@ -394,8 +394,8 @@
+@@ -351,7 +351,7 @@ def runValidation(files):
+ if (do_memtest == 1 and not filename.endswith("exe")):
+ # Check memory leaks
+ p3 = Popen(["./eval_valgrind.sh", "obj/"+filename, nowstr, attrib], stdout=PIPE)
+- output = p3.communicate()[0]
++ output = p3.communicate()[0].decode('UTF-8')
+ deflost = int(output.split(' ')[0])
+ indlost = int(output.split(' ')[1])
+ reachable = int(output.split(' ')[2])
+@@ -394,8 +394,8 @@ if __name__ == "__main__":
num_modules = len(test_modules)
@@ -57,7 +75,7 @@ Last-Update: 2020-06-01
files = []
for cur_mod in test_modules:
-@@ -404,16 +404,16 @@
+@@ -404,16 +404,16 @@ if __name__ == "__main__":
continue
mod_files = [cur_mod+"/"+x for x in os.listdir("obj/"+cur_mod)]
fancyprint(modules[cur_mod], " {:<15} {:>3} tests ".format(cur_mod, len(mod_files)))
@@ -78,7 +96,7 @@ Last-Update: 2020-06-01
if num_tests == 0:
sys.exit()
-@@ -425,7 +425,7 @@
+@@ -425,7 +425,7 @@ if __name__ == "__main__":
if (len(sys.argv) > 1):
test_type = which_test.get(sys.argv[1])
if test_type == 2:
@@ -87,7 +105,7 @@ Last-Update: 2020-06-01
success_count = runSpeedTest(files)
else:
success_count = runValidation(files)
-@@ -433,7 +433,7 @@
+@@ -433,7 +433,7 @@ if __name__ == "__main__":
success_count = runValidation(files)
# Final summary
@@ -96,7 +114,7 @@ Last-Update: 2020-06-01
global_run_time = int(time.time()*1000) - global_start_time
fancyprint("-", "Tests done... it took %d ms" % global_run_time, True)
fancyprint("green", " %d/%d (%3.2f%%) OK"
-@@ -442,4 +442,4 @@
+@@ -442,4 +442,4 @@ if __name__ == "__main__":
fancyprint("red", " %d/%d (%3.2f%%) FAIL"
% (num_tests-success_count, num_tests, 100 - 100*success_count/num_tests), True)
=====================================
debian/patches/series
=====================================
@@ -1,2 +1,3 @@
2to3.patch
modify_test_makefile.patch
+test.patch
=====================================
debian/patches/test.patch
=====================================
@@ -0,0 +1,13 @@
+--- a/test/runtest.py
++++ b/test/runtest.py
+@@ -320,6 +320,10 @@ def runValidation(files):
+ p1 = Popen("obj/"+filename+" "+attrib+" 2>tmperr >tmp", shell=True)
+ os.waitpid(p1.pid, 0)
+
++ with open('tmperr', 'r') as file:
++ print("\ntmpfile: ")
++ print(*file.readlines())
++
+ end_time = int(time.time()*1000)
+ run_time = end_time - start_time
+ sys.stdout.write("%8d ms " % run_time)
View it on GitLab: https://salsa.debian.org/med-team/pll-modules/-/compare/03dac017722a32de0aa456a00013c2a9fa6a8ac3...b793448351f8425f7a511b8e4cba155fee638701
--
View it on GitLab: https://salsa.debian.org/med-team/pll-modules/-/compare/03dac017722a32de0aa456a00013c2a9fa6a8ac3...b793448351f8425f7a511b8e4cba155fee638701
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20200608/05ec7932/attachment-0001.html>
More information about the debian-med-commit
mailing list