Commits

Ralph Bean committed f9b4509

Changes, trying to track down a bug up on webfaction.

Comments (0)

Files changed (2)

         try:
             with open('htmlcov/results-%s' % repr(self)) as f:
                 lines = f.readlines()
+                maybe_lines = [l for l in lines if 'Ran' in l]
+                self.tests = " <br/> ".join(lines)
                 try:
                     self.tests = lines[-3].strip()
+                    self.tests = maybe_lines[0]
                 except IndexError as e:
                     # Just for debugging this script.  This should never happen.
-                    self.tests = " <br/> ".join(lines)
+                    pass
         except IOError as e:
             pass
 
         commands = [
             "cd /home/threebean/tw2-tests",
             "cd %s" % repr(self),
-            "rmvirtualenv %s-venv" % repr(self),
-            "mkvirtualenv --no-site-packages %s-venv" % repr(self),
+            "rm -rf ~/.virtualenvs/%s-venv" % repr(self),
+            "virtualenv --no-site-packages ~/.virtualenvs/%s-venv" % repr(self),
+            "source ~/.virtualenvs/%s-venv/bin/activate" % repr(self),
             "python setup.py test -q 2>> ../htmlcov/results-%s" % repr(self),
             "pip install coverage",
             "coverage run --source=tw2/ setup.py test",

generate-report.sh

 #!/bin/bash -e
 source ~/.bashrc
 
-workon finalize_report || mkvirtualenv --no-site-packages finalize_report
+if [ ! -f ~/finalize_report/bin/activate ] ; then
+    virtualenv --no-site-packages ~/finalize_report
+fi
+source ~/finalize_report/bin/activate
+
 pip install mako genshi mercurial formencode
 
 ./_repolist.py > _run-tests.sh
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.