Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/mobile/cmd/gomobile: build test is flaky on darwin #11889

Closed
rakyll opened this issue Jul 27, 2015 · 2 comments
Closed

x/mobile/cmd/gomobile: build test is flaky on darwin #11889

rakyll opened this issue Jul 27, 2015 · 2 comments

Comments

@rakyll
Copy link
Contributor

rakyll commented Jul 27, 2015

Occasionally failing with the following on a darwin host:

$ go test golang.org/x/mobile/cmd/gomobile/...

go test .
--- FAIL: TestIOSBuild (0.03s)
    build_darwin_test.go:40: unexpected output:
        --- /var/folders/00/1b8h8000h01000cxqpysvccm005d21/T/gofmt539734488 2015-07-27 11:49:58.000000000 -0700
        +++ /var/folders/00/1b8h8000h01000cxqpysvccm005d21/T/gofmt986936151 2015-07-27 11:49:58.000000000 -0700
        @@ -1,5 +1,122 @@
         GOMOBILE=/Users/jbd/pkg/gomobile
         WORK=$WORK
        +mkdir -p $WORK/main
        +echo "<?xml version="1.0" encoding="UTF-8"?>
        +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
        +<plist version="1.0">
        +<dict>
        +  <key>CFBundleDevelopmentRegion</key>
        +  <string>en</string>
        +  <key>CFBundleExecutable</key>
        +  <string>main</string>
        +  <key>CFBundleIdentifier</key>
        +  <string>org.golang.todo.$(PRODUCT_NAME:rfc1034identifier)</string>
        +  <key>CFBundleInfoDictionaryVersion</key>
        +  <string>6.0</string>
        +  <key>CFBundleName</key>
        +  <string>Basic</string>
        +  <key>CFBundlePackageType</key>
        +  <string>APPL</string>
        +  <key>CFBundleShortVersionString</key>
        +  <string>1.0</string>
        +  <key>CFBundleSignature</key>
        +  <string>????</string>
        +  <key>CFBundleVersion</key>
        +  <string>1</string>
        +  <key>LSRequiresIPhoneOS</key>
        +  <true/>
        +  <key>UILaunchStoryboardName</key>
        +  <string>LaunchScreen</string>
        +  <key>UIRequiredDeviceCapabilities</key>
        +  <array>
        +    <string>armv7</string>
        +  </array>
        +  <key>UISupportedInterfaceOrientations</key>
        +  <array>
        +    <string>UIInterfaceOrientationPortrait</string>
        +    <string>UIInterfaceOrientationLandscapeLeft</string>
        +    <string>UIInterfaceOrientationLandscapeRight</string>
        +  </array>
        +  <key>UISupportedInterfaceOrientations~ipad</key>
        +  <array>
        +    <string>UIInterfaceOrientationPortrait</string>
        +    <string>UIInterfaceOrientationPortraitUpsideDown</string>
        +    <string>UIInterfaceOrientationLandscapeLeft</string>
        +    <string>UIInterfaceOrientationLandscapeRight</string>
        +  </array>
        +</dict>
        +</plist>
        +" > $WORK/main/Info.plist
        +mkdir -p $WORK/main/Images.xcassets/AppIcon.appiconset
        +echo "{
        +  "images" : [
        +    {
        +      "idiom" : "iphone",
        +      "size" : "29x29",
        +      "scale" : "2x"
        +    },
        +    {
        +      "idiom" : "iphone",
        +      "size" : "29x29",
        +      "scale" : "3x"
        +    },
        +    {
        +      "idiom" : "iphone",
        +      "size" : "40x40",
        +      "scale" : "2x"
        +    },
        +    {
        +      "idiom" : "iphone",
        +      "size" : "40x40",
        +      "scale" : "3x"
        +    },
        +    {
        +      "idiom" : "iphone",
        +      "size" : "60x60",
        +      "scale" : "2x"
        +    },
        +    {
        +      "idiom" : "iphone",
        +      "size" : "60x60",
        +      "scale" : "3x"
        +    },
        +    {
        +      "idiom" : "ipad",
        +      "size" : "29x29",
        +      "scale" : "1x"
        +    },
        +    {
        +      "idiom" : "ipad",
        +      "size" : "29x29",
        +      "scale" : "2x"
        +    },
        +    {
        +      "idiom" : "ipad",
        +      "size" : "40x40",
        +      "scale" : "1x"
        +    },
        +    {
        +      "idiom" : "ipad",
        +      "size" : "40x40",
        +      "scale" : "2x"
        +    },
        +    {
        +      "idiom" : "ipad",
        +      "size" : "76x76",
        +      "scale" : "1x"
        +    },
        +    {
        +      "idiom" : "ipad",
        +      "size" : "76x76",
        +      "scale" : "2x"
        +    }
        +  ],
        +  "info" : {
        +    "version" : 1,
        +    "author" : "xcode"
        +  }
        +}
        +" > $WORK/main/Images.xcassets/AppIcon.appiconset/Contents.json
         mkdir -p $WORK/main.xcodeproj
         echo "// !$*UTF8*$!
         {
        @@ -252,123 +369,6 @@
           rootObject = 254BB8361B1FD08900C56DE9 /* Project object */;
         }
         " > $WORK/main.xcodeproj/project.pbxproj
        -mkdir -p $WORK/main
        -echo "<?xml version="1.0" encoding="UTF-8"?>
        -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
        -<plist version="1.0">
        -<dict>
        -  <key>CFBundleDevelopmentRegion</key>
        -  <string>en</string>
        -  <key>CFBundleExecutable</key>
        -  <string>main</string>
        -  <key>CFBundleIdentifier</key>
        -  <string>org.golang.todo.$(PRODUCT_NAME:rfc1034identifier)</string>
        -  <key>CFBundleInfoDictionaryVersion</key>
        -  <string>6.0</string>
        -  <key>CFBundleName</key>
        -  <string>Basic</string>
        -  <key>CFBundlePackageType</key>
        -  <string>APPL</string>
        -  <key>CFBundleShortVersionString</key>
        -  <string>1.0</string>
        -  <key>CFBundleSignature</key>
        -  <string>????</string>
        -  <key>CFBundleVersion</key>
        -  <string>1</string>
        -  <key>LSRequiresIPhoneOS</key>
        -  <true/>
        -  <key>UILaunchStoryboardName</key>
        -  <string>LaunchScreen</string>
        -  <key>UIRequiredDeviceCapabilities</key>
        -  <array>
        -    <string>armv7</string>
        -  </array>
        -  <key>UISupportedInterfaceOrientations</key>
        -  <array>
        -    <string>UIInterfaceOrientationPortrait</string>
        -    <string>UIInterfaceOrientationLandscapeLeft</string>
        -    <string>UIInterfaceOrientationLandscapeRight</string>
        -  </array>
        -  <key>UISupportedInterfaceOrientations~ipad</key>
        -  <array>
        -    <string>UIInterfaceOrientationPortrait</string>
        -    <string>UIInterfaceOrientationPortraitUpsideDown</string>
        -    <string>UIInterfaceOrientationLandscapeLeft</string>
        -    <string>UIInterfaceOrientationLandscapeRight</string>
        -  </array>
        -</dict>
        -</plist>
        -" > $WORK/main/Info.plist
        -mkdir -p $WORK/main/Images.xcassets/AppIcon.appiconset
        -echo "{
        -  "images" : [
        -    {
        -      "idiom" : "iphone",
        -      "size" : "29x29",
        -      "scale" : "2x"
        -    },
        -    {
        -      "idiom" : "iphone",
        -      "size" : "29x29",
        -      "scale" : "3x"
        -    },
        -    {
        -      "idiom" : "iphone",
        -      "size" : "40x40",
        -      "scale" : "2x"
        -    },
        -    {
        -      "idiom" : "iphone",
        -      "size" : "40x40",
        -      "scale" : "3x"
        -    },
        -    {
        -      "idiom" : "iphone",
        -      "size" : "60x60",
        -      "scale" : "2x"
        -    },
        -    {
        -      "idiom" : "iphone",
        -      "size" : "60x60",
        -      "scale" : "3x"
        -    },
        -    {
        -      "idiom" : "ipad",
        -      "size" : "29x29",
        -      "scale" : "1x"
        -    },
        -    {
        -      "idiom" : "ipad",
        -      "size" : "29x29",
        -      "scale" : "2x"
        -    },
        -    {
        -      "idiom" : "ipad",
        -      "size" : "40x40",
        -      "scale" : "1x"
        -    },
        -    {
        -      "idiom" : "ipad",
        -      "size" : "40x40",
        -      "scale" : "2x"
        -    },
        -    {
        -      "idiom" : "ipad",
        -      "size" : "76x76",
        -      "scale" : "1x"
        -    },
        -    {
        -      "idiom" : "ipad",
        -      "size" : "76x76",
        -      "scale" : "2x"
        -    }
        -  ],
        -  "info" : {
        -    "version" : 1,
        -    "author" : "xcode"
        -  }
        -}
        -" > $WORK/main/Images.xcassets/AppIcon.appiconset/Contents.json
         GOOS=darwin GOARCH=arm GOARM=7 CC=clang-iphoneos CXX=clang-iphoneos CGO_CFLAGS=-isysroot=iphoneos -arch armv7 CGO_LDFLAGS=-isysroot=iphoneos -arch armv7 CGO_ENABLED=1 go build -p=8 -pkgdir=$GOMOBILE/pkg_darwin_arm -tags="" -x -tags=ios -o=$WORK/arm golang.org/x/mobile/example/basic
         GOOS=darwin GOARCH=arm64 CC=clang-iphoneos CXX=clang-iphoneos CGO_CFLAGS=-isysroot=iphoneos -arch arm64 CGO_LDFLAGS=-isysroot=iphoneos -arch arm64 CGO_ENABLED=1 go build -p=8 -pkgdir=$GOMOBILE/pkg_darwin_arm64 -tags="" -x -tags=ios -o=$WORK/arm64 golang.org/x/mobile/example/basic
         xcrun lipo -create $WORK/arm $WORK/arm64 -o $WORK/main/main
@rakyll rakyll self-assigned this Jul 27, 2015
@rakyll rakyll added this to the Unreleased milestone Jul 27, 2015
@crawshaw crawshaw assigned crawshaw and unassigned rakyll Jul 27, 2015
@crawshaw
Copy link
Member

I fixed this a couple of days ago in https://go-review.googlesource.com/12679

@gopherbot
Copy link

CL https://golang.org/cl/12679 mentions this issue.

@golang golang locked and limited conversation to collaborators Aug 5, 2016
imWildCat pushed a commit to imWildCat/go-mobile that referenced this issue Apr 10, 2021
This deflakes the TestIOSBuild test, which relies on the iteration
order. While here, use the existing contents to shorten the test
output comparison.

Fixes golang/go#11889

Change-Id: Ib8c9592d07c53a12eee1f40267eaa2074b8d71cc
Reviewed-on: https://go-review.googlesource.com/12679
Reviewed-by: Burcu Dogan <jbd@google.com>
imWildCat pushed a commit to imWildCat/go-mobile that referenced this issue Apr 11, 2021
This deflakes the TestIOSBuild test, which relies on the iteration
order. While here, use the existing contents to shorten the test
output comparison.

Fixes golang/go#11889

Change-Id: Ib8c9592d07c53a12eee1f40267eaa2074b8d71cc
Reviewed-on: https://go-review.googlesource.com/12679
Reviewed-by: Burcu Dogan <jbd@google.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants