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

Proposed by Vincent Ladeuil
Status: Merged
Approved by: Vincent Ladeuil
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 Approve
PS Jenkins bot (community) continuous-integration Approve
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.
Revision history for this message
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)
Revision history for this message
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)
Revision history for this message
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
Revision history for this message
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
=== modified file 'TRICKS'
--- TRICKS 2014-03-14 10:49:19 +0000
+++ TRICKS 2014-03-22 00:12:29 +0000
@@ -294,6 +294,8 @@
294- merge branches into the payload,294- merge branches into the payload,
295- restart the service.295- restart the service.
296296
297NOTE: Since we use the test runner has an example, some paths need to be
298adjusted for other components. Like-wise, some command outputs may vary.
297299
298Turning the payload into a branch300Turning the payload into a branch
299---------------------------------301---------------------------------
300302
=== modified file 'test_runner/run_test.py'
--- test_runner/run_test.py 2014-03-17 18:07:22 +0000
+++ test_runner/run_test.py 2014-03-22 00:12:29 +0000
@@ -48,15 +48,13 @@
48 os.mkdir('results')48 os.mkdir('results')
4949
5050
51def get_dsc_path(package, cwd):51def get_src_tree_path(pacakge, cwd):
52 """Returns the '.dsc' path found in the 'apt-get source' files."""52 """Returns the path where 'apt-get source' did the extraction."""
53 # FIXME: It would be better to just use the files from the ticket but: 1)
54 # it requires changing several components API, 2) It's not guaranteed to be
55 # enough. apt-get source *is* guaranteed to be enough. -- vila 2014-03-11
56 files = os.listdir(cwd)53 files = os.listdir(cwd)
57 for f in files:54 for f in files:
58 if f.endswith('.dsc'):55 path = os.path.join(cwd, f)
59 return os.path.join(cwd, f)56 if os.path.isdir(path):
57 return path
6058
6159
62def parse_summary_line(line):60def parse_summary_line(line):
@@ -145,12 +143,16 @@
145 # MISSINGTEST: Unable to locate package (wrong name or whatever)143 # MISSINGTEST: Unable to locate package (wrong name or whatever)
146 # MISSINGTEST: no deb-src in source.list144 # MISSINGTEST: no deb-src in source.list
147 run('apt-get', 'source', package, cwd=package)145 run('apt-get', 'source', package, cwd=package)
148 # MISSINGTEST: dsc file not found146 # MISSINGTEST: no dir found
149 dsc_path = get_dsc_path(package, cwd=package)147 src_tree_path = get_src_tree_path(package, cwd=package)
150 try:148 try:
151 summary_path = '{}-summary.log'.format(package)149 summary_path = '{}-summary.log'.format(package)
152 log_path = '{}.log'.format(package)150 log_path = '{}.log'.format(package)
153 cmd = ['sudo', 'adt-run', dsc_path,151 cmd = ['sudo', 'adt-run',
152 # Restrictions: build-needed will override --no-built-binaries
153 # so it's safe to specify it.
154 '--no-built-binaries',
155 '--unbuilt-tree', src_tree_path,
154 '--summary', summary_path,156 '--summary', summary_path,
155 '--log-file', log_path,157 '--log-file', log_path,
156 # Required to get files produced in 'results'158 # Required to get files produced in 'results'

Subscribers

People subscribed via source and target branches