Skip to content

[android][test] Fix several tests on the Android CI #59279

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

Merged
merged 1 commit into from
Jun 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/Driver/Dependencies/only-skip-once.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// XFAIL: OS=linux-gnu, OS=openbsd, OS=windows-msvc
// XFAIL: OS=linux-gnu, OS=openbsd, OS=windows-msvc, OS=linux-android, OS=linux-androideabi

// RUN: %empty-directory(%t)
// RUN: cp -r %S/Inputs/only-skip-once/* %t
Expand Down
2 changes: 1 addition & 1 deletion test/Driver/parseable_output.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %swiftc_driver_plain -emit-executable %s -o %t.out -emit-module -emit-module-path %t.swiftmodule -emit-objc-header-path %t.h -serialize-diagnostics -emit-dependencies -parseable-output -driver-skip-execution 2>&1 | %FileCheck %s

// XFAIL: OS=freebsd, OS=openbsd, OS=linux-gnu
// XFAIL: OS=freebsd, OS=openbsd, OS=linux-gnu, OS=linux-android, OS=linux-androideabi

// CHECK: {{[1-9][0-9]*}}
// CHECK-NEXT: {
Expand Down
2 changes: 1 addition & 1 deletion test/Driver/parseable_output_unicode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// RUN: cat "%S/Inputs/unicode.txt" >> %t.rsp
// RUN: %swiftc_driver_plain -emit-executable @%t.rsp -o %t.out -emit-module -emit-module-path %t.swiftmodule -emit-objc-header-path %t.h -serialize-diagnostics -emit-dependencies -parseable-output -driver-skip-execution 2>&1 | %FileCheck %s

// XFAIL: OS=freebsd, OS=openbsd, OS=linux-gnu
// XFAIL: OS=freebsd, OS=openbsd, OS=linux-gnu, OS=linux-android, OS=linux-androideabi

// CHECK: {{[1-9][0-9]*}}
// CHECK-NEXT: {
Expand Down
2 changes: 1 addition & 1 deletion test/Driver/sdk-apple.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// XFAIL: OS=freebsd, OS=openbsd, OS=linux-gnu, OS=windows-msvc
// XFAIL: OS=freebsd, OS=openbsd, OS=linux-gnu, OS=windows-msvc, OS=linux-android, OS=linux-androideabi

// Test SDK detection for immediate mode.
// RUN: %empty-directory(%t)
Expand Down
1 change: 0 additions & 1 deletion test/IDE/print_clang_header_i386.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// REQUIRES: OS=macosx
// REQUIRES: CPU=x86_64
// FIXME: rdar://problem/19648117 Needs splitting objc parts out
// XFAIL: OS=linux-gnu, OS=freebsd
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed because of the REQUIRES: OS=macosx line above?


// RUN: echo '#include "header-to-print.h"' > %t.i386.m
// RUN: %empty-directory(%t)
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/abitypes.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/Inputs/abi %s -emit-ir -enable-objc-interop | %FileCheck -check-prefix=%target-cpu-%target-os-abi %s

// FIXME: rdar://problem/19648117 Needs splitting objc parts out
// XFAIL: OS=linux-gnu, OS=windows-msvc, OS=openbsd
// XFAIL: OS=linux-gnu, OS=windows-msvc, OS=openbsd, OS=linux-android, OS=linux-androideabi

import gadget
import Foundation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// RUN: rm -rf %t
// RUN: split-file %s %t
// RUN: not %target-swift-frontend -emit-ir -I %t/Inputs %t/test.swift -enable-experimental-cxx-interop 2>&1 | %FileCheck %s
//
// XFAIL: OS=linux-android, OS=linux-androideabi

//--- Inputs/module.modulemap
module Test {
Expand Down
2 changes: 2 additions & 0 deletions test/Interop/Cxx/foreign-reference/move-only-irgen.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-experimental-cxx-interop -validate-tbd-against-ir=none -disable-llvm-verify | %FileCheck %s
//
// XFAIL: OS=linux-android, OS=linux-androideabi

import MoveOnly

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: %target-swift-ide-test -print-module -module-to-print=MoveOnly -I %S/Inputs -source-filename=x -enable-experimental-cxx-interop | %FileCheck %s
//
// XFAIL: OS=linux-android, OS=linux-androideabi

// CHECK: class MoveOnly {
// CHECK-NOT: init
Expand Down
2 changes: 2 additions & 0 deletions test/Interop/Cxx/foreign-reference/move-only-silgen.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: %target-swift-emit-silgen %s -I %S/Inputs -enable-experimental-cxx-interop | %FileCheck %s
//
// XFAIL: OS=linux-android, OS=linux-androideabi

import MoveOnly

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: %target-swift-ide-test -print-module -module-to-print=Nullable -I %S/Inputs -source-filename=x -enable-experimental-cxx-interop | %FileCheck %s
//
// XFAIL: OS=linux-android, OS=linux-androideabi

// CHECK: class Empty {
// CHECK: func test() -> Int32
Expand Down
2 changes: 2 additions & 0 deletions test/Interop/Cxx/foreign-reference/pod-irgen.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-experimental-cxx-interop -validate-tbd-against-ir=none -disable-llvm-verify | %FileCheck %s
//
// XFAIL: OS=linux-android, OS=linux-androideabi

import POD

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: %target-swift-ide-test -print-module -module-to-print=POD -I %S/Inputs -source-filename=x -enable-experimental-cxx-interop | %FileCheck %s
//
// XFAIL: OS=linux-android, OS=linux-androideabi

// CHECK: class Empty {
// CHECK-NOT: init
Expand Down
2 changes: 2 additions & 0 deletions test/Interop/Cxx/foreign-reference/pod-silgen.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: %target-swift-emit-silgen %s -I %S/Inputs -enable-experimental-cxx-interop | %FileCheck %s
//
// XFAIL: OS=linux-android, OS=linux-androideabi

import POD

Expand Down
2 changes: 2 additions & 0 deletions test/Interop/Cxx/foreign-reference/singleton-irgen.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-experimental-cxx-interop -validate-tbd-against-ir=none -disable-llvm-verify | %FileCheck %s
//
// XFAIL: OS=linux-android, OS=linux-androideabi

import Singleton

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: %target-swift-ide-test -print-module -module-to-print=Singleton -I %S/Inputs -source-filename=x -enable-experimental-cxx-interop | %FileCheck %s
//
// XFAIL: OS=linux-android, OS=linux-androideabi

// CHECK: class DeletedDtor {
// CHECK-NOT: init
Expand Down
2 changes: 2 additions & 0 deletions test/Interop/Cxx/foreign-reference/singleton-silgen.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: %target-swift-emit-silgen %s -I %S/Inputs -enable-experimental-cxx-interop | %FileCheck %s
//
// XFAIL: OS=linux-android, OS=linux-androideabi

import Singleton

Expand Down
2 changes: 1 addition & 1 deletion test/Prototypes/CollectionTransformers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ import Darwin
import Dispatch

// FIXME: port to Linux.
// XFAIL: OS=linux-gnu, OS=windows-msvc, OS=openbsd
// XFAIL: OS=linux-gnu, OS=windows-msvc, OS=openbsd, OS=linux-android

// A wrapper for pthread_t with platform-independent interface.
public struct _stdlib_pthread_t : Equatable, Hashable {
Expand Down
2 changes: 1 addition & 1 deletion test/Reflection/box_descriptors.sil
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// RUN: %target-swift-reflection-dump -binary-filename %t/capture_descriptors%{target-shared-library-suffix} | %FileCheck %s

// SR-10758
// UNSUPPORTED: OS=linux-gnu
// UNSUPPORTED: OS=linux-gnu, OS=linux-android, OS=linux-androideabi

// SR-12893
// XFAIL: OS=openbsd
Expand Down
12 changes: 6 additions & 6 deletions test/SIL/clang-function-types-android.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import ctypes

public func f(g: @convention(c, cType: "void (*)(size_t)") (Int) -> ()) { g(0) }

// CHECK-32: sil @$s4main1f1gyySiXzC9_ZTSPFvjE_tF : $@convention(thin) (@convention(c, cType: "void (*)(unsigned int)") @noescape (Int) -> ()) -> () {
// CHECK-32: bb0(%0 : $@convention(c, cType: "void (*)(unsigned int)") @noescape (Int) -> ()):
// CHECK-32: debug_value %0 : $@convention(c, cType: "void (*)(unsigned int)") @noescape (Int) -> (), let, name "g", argno 1 // id: %1
// CHECK-32: sil @$s4main1f1gyySiXzC9_ZTSPFvjE_tF : $@convention(thin) (@convention(c, cType: "void (*)(unsigned int)") (Int) -> ()) -> () {
// CHECK-32: bb0(%0 : $@convention(c, cType: "void (*)(unsigned int)") (Int) -> ()):
// CHECK-32: debug_value %0 : $@convention(c, cType: "void (*)(unsigned int)") (Int) -> (), let, name "g", argno 1 // id: %1

// CHECK-64: sil @$s4main1f1gyySiXzC9_ZTSPFvmE_tF : $@convention(thin) (@convention(c, cType: "void (*)(unsigned long)") @noescape (Int) -> ()) -> () {
// CHECK-64: bb0(%0 : $@convention(c, cType: "void (*)(unsigned long)") @noescape (Int) -> ()):
// CHECK-64: debug_value %0 : $@convention(c, cType: "void (*)(unsigned long)") @noescape (Int) -> (), let, name "g", argno 1 // id: %1
// CHECK-64: sil @$s4main1f1gyySiXzC9_ZTSPFvmE_tF : $@convention(thin) (@convention(c, cType: "void (*)(unsigned long)") (Int) -> ()) -> () {
// CHECK-64: bb0(%0 : $@convention(c, cType: "void (*)(unsigned long)") (Int) -> ()):
// CHECK-64: debug_value %0 : $@convention(c, cType: "void (*)(unsigned long)") (Int) -> (), let, name "g", argno 1 // id: %1
4 changes: 4 additions & 0 deletions test/SILOptimizer/concat_string_literals.64.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
// We have a separate test for 32-bit architectures.
// REQUIRES: PTRSIZE=64

// The string tag was recently shifted to the second byte on Android AArch64,
// so these tests will need to be adapted for that.
// XFAIL: OS=linux-android && CPU=aarch64

// NOTE: 25185.byteSwapped = 0x62 'a', 0x61 'b'
// CHECK-LABEL: test_ascii_scalar_scalar2
// CHECK: ret { i64, %swift.bridge* } { i64 25185, %swift.bridge* inttoptr (i64 -{{[0-9]+}} to %swift.bridge*) }
Expand Down
2 changes: 0 additions & 2 deletions test/Sanitizers/tsan/objc_async.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
// REQUIRES: concurrency
// REQUIRES: objc_interop
// REQUIRES: tsan_runtime
// UNSUPPORTED: OS=linux-gnu
// UNSUPPORTED: OS=windows-msvc
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this test requires objc_interop, which is only available on Apple platforms, these lines are not needed.


// rdar://76038845
// UNSUPPORTED: use_os_stdlib
Expand Down
2 changes: 1 addition & 1 deletion test/lit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -1966,7 +1966,7 @@ def source_compiler_rt_libs(path):
and config.compiler_rt_platform in lib])

compiler_rt_dir = make_path(test_resource_dir, 'clang', 'lib',
platform.system().lower() if not kIsAndroid else 'android')
platform.system().lower())
source_compiler_rt_libs(compiler_rt_dir)

def check_runtime_libs(features_to_check):
Expand Down
2 changes: 1 addition & 1 deletion test/stdlib/simd_diagnostics.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RUN: %target-typecheck-verify-swift

// FIXME: No simd module on linux rdar://problem/20795411
// XFAIL: OS=linux-gnu, OS=windows-msvc, OS=openbsd
// XFAIL: OS=linux-gnu, OS=windows-msvc, OS=openbsd, OS=linux-android, OS=linux-androideabi
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strangely, this test passes when the toolchain is built and run natively on Android but not when cross-compiling, not sure what's going on.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And now it fails natively too. 🤷

// XFAIL: OS=wasi

import simd
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

// REQUIRES: swift_stdlib_no_asserts,optimized_stdlib
// REQUIRES: long_test
// REQUIRES: CPU=arm64 || CPU=x86_64
// REQUIRES: CPU=arm64 || CPU=x86_64 || CPU=aarch64

// Check if the optimizer can optimize the whole array into a statically
// initialized global
Expand Down
2 changes: 1 addition & 1 deletion validation-test/stdlib/SIMDParameterPassing.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

// REQUIRES: executable_test
// REQUIRES: long_test
// XFAIL: OS=linux-gnu
// XFAIL: OS=linux-gnu, OS=linux-android

import StdlibUnittest
import simd
Expand Down