Merge lp:~vila/ubuntu-ci-services-itself/1293625-no-built-binaries into lp:ubuntu-ci-services-itself

Proposed by Vincent Ladeuil on 2014-03-22
Status: Merged
Approved by: Vincent Ladeuil on 2014-03-25
Approved revision: 414
Merged at revision: 413
Proposed branch: lp:~vila/ubuntu-ci-services-itself/1293625-no-built-binaries
Merge into: lp:ubuntu-ci-services-itself
Diff against target: 57 lines (+14/-10)
2 files modified
TRICKS (+2/-0)
test_runner/run_test.py (+12/-10)
To merge this branch: bzr merge lp:~vila/ubuntu-ci-services-itself/1293625-no-built-binaries
Reviewer Review Type Date Requested Status
Paul Larson 2014-03-22 Approve on 2014-03-24
PS Jenkins bot (community) continuous-integration Approve on 2014-03-22
Review via email: mp+212267@code.launchpad.net

Commit message

Fix the adt-run call to not build binaries unless required.

Description of the change

Re-digging adt-run and testing locally (yeah throw away vms from uci-vms !)
I found the right combination of options.

I did a few more tests and this combination is still obeying 'Restrictions:
build-needed' and still installing the test deps when needed but don't
rebuild the package.

To post a comment you must log in.
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:414
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~vila/ubuntu-ci-services-itself/1293625-no-built-binaries/+merge/212267/+edit-commit-message

http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/456/
Executed test runs:

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/456/rebuild

review: Needs Fixing (continuous-integration)
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:414
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/458/
Executed test runs:

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/458/rebuild

review: Approve (continuous-integration)
Paul Larson (pwlars) wrote :

Makes sense, which packages did you try running this with? Would feel more comfortable knowing it was tried with some package that normally has to be compiled, but doesn't request it in the restrictions to see that 1. it doesn't compile it, and 2. the tests still pass since the binary package is installed. Otherwise, +1

review: Approve
Vincent Ladeuil (vila) wrote :

> Makes sense, which packages did you try running this with?

libpng

This package requires that *some* test deps are compiled but not the package library itself.

> Would feel more
> comfortable knowing it was tried with some package that normally has to be
> compiled, but doesn't request it in the restrictions to see

'has to be compiled'is a configuration that should not exist. It would mean the package is not testing the installed version which is what dep-8 tests are about.

> that 1. it doesn't
> compile it, and 2. the tests still pass since the binary package is installed.

But *that* is what I tested, test passing despite not compiling the package.

> Otherwise, +1

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'TRICKS'
2--- TRICKS 2014-03-14 10:49:19 +0000
3+++ TRICKS 2014-03-22 00:12:29 +0000
4@@ -294,6 +294,8 @@
5 - merge branches into the payload,
6 - restart the service.
7
8+NOTE: Since we use the test runner has an example, some paths need to be
9+adjusted for other components. Like-wise, some command outputs may vary.
10
11 Turning the payload into a branch
12 ---------------------------------
13
14=== modified file 'test_runner/run_test.py'
15--- test_runner/run_test.py 2014-03-17 18:07:22 +0000
16+++ test_runner/run_test.py 2014-03-22 00:12:29 +0000
17@@ -48,15 +48,13 @@
18 os.mkdir('results')
19
20
21-def get_dsc_path(package, cwd):
22- """Returns the '.dsc' path found in the 'apt-get source' files."""
23- # FIXME: It would be better to just use the files from the ticket but: 1)
24- # it requires changing several components API, 2) It's not guaranteed to be
25- # enough. apt-get source *is* guaranteed to be enough. -- vila 2014-03-11
26+def get_src_tree_path(pacakge, cwd):
27+ """Returns the path where 'apt-get source' did the extraction."""
28 files = os.listdir(cwd)
29 for f in files:
30- if f.endswith('.dsc'):
31- return os.path.join(cwd, f)
32+ path = os.path.join(cwd, f)
33+ if os.path.isdir(path):
34+ return path
35
36
37 def parse_summary_line(line):
38@@ -145,12 +143,16 @@
39 # MISSINGTEST: Unable to locate package (wrong name or whatever)
40 # MISSINGTEST: no deb-src in source.list
41 run('apt-get', 'source', package, cwd=package)
42- # MISSINGTEST: dsc file not found
43- dsc_path = get_dsc_path(package, cwd=package)
44+ # MISSINGTEST: no dir found
45+ src_tree_path = get_src_tree_path(package, cwd=package)
46 try:
47 summary_path = '{}-summary.log'.format(package)
48 log_path = '{}.log'.format(package)
49- cmd = ['sudo', 'adt-run', dsc_path,
50+ cmd = ['sudo', 'adt-run',
51+ # Restrictions: build-needed will override --no-built-binaries
52+ # so it's safe to specify it.
53+ '--no-built-binaries',
54+ '--unbuilt-tree', src_tree_path,
55 '--summary', summary_path,
56 '--log-file', log_path,
57 # Required to get files produced in 'results'

Subscribers

People subscribed via source and target branches