Merge lp:~the-test-people/selenium-simple-test/ci-fixes into lp:selenium-simple-test

Proposed by Peter Russell
Status: Merged
Approved by: Corey Goldberg
Approved revision: 440
Merged at revision: 438
Proposed branch: lp:~the-test-people/selenium-simple-test/ci-fixes
Merge into: lp:selenium-simple-test
Diff against target: 75 lines (+18/-12)
4 files modified
ci.sh (+5/-2)
src/testproject/manage.py (+11/-8)
src/testproject/simple/urls.py (+1/-1)
src/testproject/urls.py (+1/-1)
To merge this branch: bzr merge lp:~the-test-people/selenium-simple-test/ci-fixes
Reviewer Review Type Date Requested Status
Corey Goldberg (community) Approve
Review via email: mp+201459@code.launchpad.net

Commit message

Fixes for the ci.sh script

Description of the change

Fixes for the ci.sh script and the test project which we've found useful in our Jenkins environment. Also filed as launchpad bug #1267380

To post a comment you must log in.
Revision history for this message
Corey Goldberg (coreygoldberg) wrote :

+1
looks good to me.

I will land this branch on trunk now.

note: 2 unit tests are currently failing, but are unrelated to this branch. I will investigate.

thanks for the contribution!

review: Approve
Revision history for this message
Simon Davy (bloodearnest) wrote :

\o/

On Thu, Jan 16, 2014 at 5:34 PM, <email address hidden> wrote:

> The proposal to merge lp:~the-test-people/selenium-simple-test/ci-fixes
> into lp:selenium-simple-test has been updated.
>
> Status: Approved => Merged
>
> For more details, see:
>
> https://code.launchpad.net/~the-test-people/selenium-simple-test/ci-fixes/+merge/201459
> --
>
> https://code.launchpad.net/~the-test-people/selenium-simple-test/ci-fixes/+merge/201459
> Your team Canonical ISD QA Team is subscribed to branch
> lp:selenium-simple-test.
>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ci.sh'
2--- ci.sh 2013-07-03 08:31:26 +0000
3+++ ci.sh 2014-01-13 16:58:19 +0000
4@@ -1,5 +1,8 @@
5 #!/bin/bash
6
7+set -e
8+
9+
10 # Continuous Integration script for SST
11 #
12 # Options:
13@@ -64,7 +67,7 @@
14 echo "installing modules from dependencies branch..."
15 DEPS="sst-deps/pythonpackages/"
16 cd $DEPS; ls *.tar.gz
17- pip install *.tar.gz --no-deps
18+ python "$(which pip)" install *.tar.gz --no-deps
19 cd ../..
20 else
21 source ENV/bin/activate
22@@ -86,7 +89,7 @@
23 if [ -n "$FLAKE8" ]; then
24 echo "----------------------------------"
25 echo "running flake8 (pyflakes/pep8) checks..."
26- flake8 src/ docs/ sst-* *.py
27+ python "$(which flake8)" src/ docs/ sst-* *.py || false
28 fi
29
30 if [ -n "$BROWSER" ]; then
31
32=== modified file 'src/testproject/manage.py'
33--- src/testproject/manage.py 2013-09-14 14:18:03 +0000
34+++ src/testproject/manage.py 2014-01-13 16:58:19 +0000
35@@ -1,9 +1,12 @@
36 #!/usr/bin/env python
37-
38-from django.core.management import execute_manager
39-
40-import settings # assumed to be in the same directory.
41-
42-
43-if __name__ == '__main__':
44- execute_manager(settings)
45+import os
46+import sys
47+
48+if __name__ == "__main__":
49+ # Add the parent directory to the python path
50+ parent_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
51+ sys.path.insert(0, parent_dir)
52+
53+ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "testproject.settings")
54+ from django.core.management import execute_from_command_line
55+ execute_from_command_line(sys.argv)
56
57=== modified file 'src/testproject/simple/urls.py'
58--- src/testproject/simple/urls.py 2013-04-23 08:42:16 +0000
59+++ src/testproject/simple/urls.py 2014-01-13 16:58:19 +0000
60@@ -1,4 +1,4 @@
61-from django.conf.urls.defaults import patterns
62+from django.conf.urls import patterns
63
64
65 urlpatterns = patterns('', (r'/', 'begin'),)
66
67=== modified file 'src/testproject/urls.py'
68--- src/testproject/urls.py 2013-08-14 13:29:25 +0000
69+++ src/testproject/urls.py 2014-01-13 16:58:19 +0000
70@@ -1,4 +1,4 @@
71-from django.conf.urls.defaults import include, patterns
72+from django.conf.urls import include, patterns
73 from django.conf import settings
74 from django.contrib.staticfiles.urls import staticfiles_urlpatterns
75 from django.contrib import admin

Subscribers

People subscribed via source and target branches