File: test_pretty_print-drop-file-name-munging.patch

package info (click to toggle)
openscad 2015.03-2%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 30,804 kB
  • ctags: 5,692
  • sloc: cpp: 39,386; sh: 3,856; ansic: 3,674; python: 1,393; yacc: 496; lex: 272; lisp: 159; makefile: 67; xml: 60
file content (26 lines) | stat: -rw-r--r-- 1,087 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From: chrysn <chrysn@fsfe.org>
Date: Mon, 8 Jun 2015 13:03:47 +0200
Subject: test_pretty_print: drop file name munging

forcibly joining the paths breaks the test suite when run out-of-tree
(as it is run when using debhelper)
---
 tests/test_pretty_print.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tests/test_pretty_print.py b/tests/test_pretty_print.py
index fc7b408..1046481 100644
--- a/tests/test_pretty_print.py
+++ b/tests/test_pretty_print.py
@@ -373,9 +373,8 @@ def to_html(project_name, startdate, tests, enddate, sysinfo, sysid, imgcomparer
             raise TypeError('Unknown test type %r' % test.type)
 
     for mf in sorted(makefiles.keys()):
-        mfname = mf.strip().lstrip(os.path.sep)
-        text = open(os.path.join(builddir, mfname)).read()
-        templates.add('makefile_template', 'makefiles', name=mfname, text=text)
+        text = open(mf).read()
+        templates.add('makefile_template', 'makefiles', name=mf, text=text)
 
     text_tests = templates.get('text_tests')
     image_tests = templates.get('image_tests')