Merge lp:~sergiusens/goget-ubuntu-touch/align into lp:goget-ubuntu-touch

Proposed by Sergio Schvezov
Status: Merged
Approved by: Sergio Schvezov
Approved revision: 208
Merged at revision: 207
Proposed branch: lp:~sergiusens/goget-ubuntu-touch/align
Merge into: lp:goget-ubuntu-touch
Diff against target: 34 lines (+5/-3)
2 files modified
sysutils/utils.go (+3/-1)
sysutils/utils_test.go (+2/-2)
To merge this branch: bzr merge lp:~sergiusens/goget-ubuntu-touch/align
Reviewer Review Type Date Requested Status
Sergio Schvezov Approve
Michael Vogt (community) Approve
Review via email: mp+270573@code.launchpad.net

Commit message

align disk images to 512 for core

To post a comment you must log in.
Revision history for this message
Michael Vogt (mvo) wrote :

LGTM

review: Approve
Revision history for this message
Snappy Tarmac (snappydevtarmac) wrote :
Download full text (4.2 KiB)

The attempt to merge lp:~sergiusens/goget-ubuntu-touch/align into lp:goget-ubuntu-touch failed. Below is the output from the failed tests.

Checking formatting
Installing godeps
Install golint
Obtaining dependencies
update github.com/blakesmith/ar failed; trying to fetch newer version
update github.com/cheggaaa/pb failed; trying to fetch newer version
github.com/blakesmith/ar now at 8bd4349a67f2533b078dbc524689d15dba0f4659
update github.com/jessevdk/go-flags failed; trying to fetch newer version
github.com/cheggaaa/pb now at da1f27ad1d9509b16f65f52fd9d8138b0f2dc7b2
update github.com/mvo5/uboot-go failed; trying to fetch newer version
github.com/jessevdk/go-flags now at 1acbbaff2f347c412a0c7884873bd72cc9c1f5b4
update gopkg.in/yaml.v2 failed; trying to fetch newer version
github.com/mvo5/uboot-go now at 69978a3e4b05cca9d7cfee489b3453dfed45e72c
update launchpad.net/snappy failed; trying to fetch newer version
gopkg.in/yaml.v2 now at 7ad95dd0798a40da1ccdff6dff35fd177b5edf40
update github.com/gosexy/gettext failed; trying to fetch newer version
launchpad.net/snappy now at <email address hidden>
update github.com/mvo5/goconfigparser failed; trying to fetch newer version
github.com/gosexy/gettext now at 98b7b91596d20b96909e6b60d57411547dd9959c
update launchpad.net/gocheck failed; trying to fetch newer version
github.com/mvo5/goconfigparser now at 26426272dda20cc76aa1fa44286dc743d2972fe8
launchpad.net/gocheck now at <email address hidden>
Building
Running tests from /tmp/tmp.UaFigPpWcn/src/launchpad.net/goget-ubuntu-touch
? launchpad.net/goget-ubuntu-touch/bootimg [no test files]
? launchpad.net/goget-ubuntu-touch/bootimg/example/abootimg-extract [no test files]
? launchpad.net/goget-ubuntu-touch/devices [no test files]
=== RUN Test
OK: 9 passed
--- PASS: Test (0.01 seconds)
PASS
coverage: 6.9% of statements
ok launchpad.net/goget-ubuntu-touch/diskimage 0.009s coverage: 6.9% of statements
=== RUN Test

----------------------------------------------------------------------
FAIL: utils_test.go:34: UtilsTestSuite.TestCreateEmptyFileGB

utils_test.go:41:
    c.Assert(fStat1.Size(), Equals, int64(1000*1000*975))
... obtained int64 = 974999552
... expected int64 = 975000000

OOPS: 4 passed, 1 FAILED
--- FAIL: Test (0.01 seconds)
FAIL
FAIL launchpad.net/goget-ubuntu-touch/sysutils 0.024s
? launchpad.net/goget-ubuntu-touch/ubuntu-device-do [no test files]
? launchpad.net/goget-ubuntu-touch/ubuntu-device-flash [no test files]
=== RUN Test
Using /tmp/gocheck-5577006791947779410/0/out/host/linux-x86/bin/emulator for the emulator runtime
OK: 2 passed
--- PASS: Test (0.00 seconds)
PASS
coverage: 4.4% of statements
ok launchpad.net/goget-ubuntu-touch/ubuntu-emulator 0.011s coverage: 4.4% of statements
=== RUN Test
OK: 14 passed
--- PASS: Test (0.01 seconds)
PASS
coverage: 26.1% of statements
ok launchpad.net/goget-ubuntu-touch/ubuntuimage 0.017s coverage: 26.1% of statements

# we always run in a fresh dir in tarmac
export GOPATH=$(mktemp -d)
trap 'rm -rf "$GOPATH"' EXIT

# this is a hack, but not sure tarmac is golang friendly
mkdir -p $GOPATH/src/launchpad.net/goget-ubuntu-touch...

Read more...

Revision history for this message
Snappy Tarmac (snappydevtarmac) wrote :
Download full text (4.2 KiB)

The attempt to merge lp:~sergiusens/goget-ubuntu-touch/align into lp:goget-ubuntu-touch failed. Below is the output from the failed tests.

Checking formatting
Installing godeps
Install golint
Obtaining dependencies
update github.com/blakesmith/ar failed; trying to fetch newer version
update github.com/cheggaaa/pb failed; trying to fetch newer version
github.com/blakesmith/ar now at 8bd4349a67f2533b078dbc524689d15dba0f4659
update github.com/jessevdk/go-flags failed; trying to fetch newer version
github.com/cheggaaa/pb now at da1f27ad1d9509b16f65f52fd9d8138b0f2dc7b2
update github.com/mvo5/uboot-go failed; trying to fetch newer version
github.com/jessevdk/go-flags now at 1acbbaff2f347c412a0c7884873bd72cc9c1f5b4
update gopkg.in/yaml.v2 failed; trying to fetch newer version
github.com/mvo5/uboot-go now at 69978a3e4b05cca9d7cfee489b3453dfed45e72c
update launchpad.net/snappy failed; trying to fetch newer version
gopkg.in/yaml.v2 now at 7ad95dd0798a40da1ccdff6dff35fd177b5edf40
update github.com/gosexy/gettext failed; trying to fetch newer version
launchpad.net/snappy now at <email address hidden>
update github.com/mvo5/goconfigparser failed; trying to fetch newer version
github.com/gosexy/gettext now at 98b7b91596d20b96909e6b60d57411547dd9959c
update launchpad.net/gocheck failed; trying to fetch newer version
github.com/mvo5/goconfigparser now at 26426272dda20cc76aa1fa44286dc743d2972fe8
launchpad.net/gocheck now at <email address hidden>
Building
Running tests from /tmp/tmp.CGrWRgWVJM/src/launchpad.net/goget-ubuntu-touch
? launchpad.net/goget-ubuntu-touch/bootimg [no test files]
? launchpad.net/goget-ubuntu-touch/bootimg/example/abootimg-extract [no test files]
? launchpad.net/goget-ubuntu-touch/devices [no test files]
=== RUN Test
OK: 9 passed
--- PASS: Test (0.01 seconds)
PASS
coverage: 6.9% of statements
ok launchpad.net/goget-ubuntu-touch/diskimage 0.009s coverage: 6.9% of statements
=== RUN Test

----------------------------------------------------------------------
FAIL: utils_test.go:34: UtilsTestSuite.TestCreateEmptyFileGB

utils_test.go:41:
    c.Assert(fStat1.Size(), Equals, int64(1000*1000*975))
... obtained int64 = 974999552
... expected int64 = 975000000

OOPS: 4 passed, 1 FAILED
--- FAIL: Test (0.00 seconds)
FAIL
FAIL launchpad.net/goget-ubuntu-touch/sysutils 0.005s
? launchpad.net/goget-ubuntu-touch/ubuntu-device-do [no test files]
? launchpad.net/goget-ubuntu-touch/ubuntu-device-flash [no test files]
=== RUN Test
Using /tmp/gocheck-5577006791947779410/0/out/host/linux-x86/bin/emulator for the emulator runtime
OK: 2 passed
--- PASS: Test (0.00 seconds)
PASS
coverage: 4.4% of statements
ok launchpad.net/goget-ubuntu-touch/ubuntu-emulator 0.014s coverage: 4.4% of statements
=== RUN Test
OK: 14 passed
--- PASS: Test (0.01 seconds)
PASS
coverage: 26.1% of statements
ok launchpad.net/goget-ubuntu-touch/ubuntuimage 0.014s coverage: 26.1% of statements

# we always run in a fresh dir in tarmac
export GOPATH=$(mktemp -d)
trap 'rm -rf "$GOPATH"' EXIT

# this is a hack, but not sure tarmac is golang friendly
mkdir -p $GOPATH/src/launchpad.net/goget-ubuntu-touch...

Read more...

208. By Sergio Schvezov

fix tests

Revision history for this message
Sergio Schvezov (sergiusens) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'sysutils/utils.go'
2--- sysutils/utils.go 2015-03-18 03:27:36 +0000
3+++ sysutils/utils.go 2015-09-09 19:23:08 +0000
4@@ -52,7 +52,9 @@
5 case GB:
6 // The image size will be reduced to fit commercial drives that are
7 // smaller than what they claim, 975 comes from 97.5% of the total size
8- size = size * 1000 * 1000 * 975
9+ // but we want to be a multiple of 512 (and size is an int) we divide by
10+ // 512 and multiply it again
11+ size = size * 1000 * 1000 * 975 / 512 * 512
12 default:
13 panic("improper sizing unit used")
14 }
15
16=== modified file 'sysutils/utils_test.go'
17--- sysutils/utils_test.go 2015-03-18 03:27:36 +0000
18+++ sysutils/utils_test.go 2015-09-09 19:23:08 +0000
19@@ -38,7 +38,7 @@
20 fStat1, err := os.Stat(f1)
21 c.Assert(err, IsNil)
22
23- c.Assert(fStat1.Size(), Equals, int64(1000*1000*975))
24+ c.Assert(fStat1.Size(), Equals, int64(974999552))
25
26 f2 := filepath.Join(s.tmpdir, "gb")
27 c.Assert(CreateEmptyFile(f2, 2, GB), IsNil)
28@@ -46,5 +46,5 @@
29 fStat2, err := os.Stat(f2)
30 c.Assert(err, IsNil)
31
32- c.Assert(fStat2.Size(), Equals, int64(2*1000*1000*975))
33+ c.Assert(fStat2.Size(), Equals, int64(1949999616))
34 }

Subscribers

People subscribed via source and target branches