Skip to content

[Test] Specialize Prototypes/BigInt.swift for Windows. #32773

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
Jul 14, 2020

Conversation

nate-chandler
Copy link
Contributor

@nate-chandler nate-chandler commented Jul 9, 2020

Building the file with asserts crashes the compiler. Building the file with no_asserts does not crash the compiler.

For non-Windows platforms, it is sufficient to XFAIL: asserts.

That does not work on Windows thanks to Python < 3: the crash is not handled by lit's not there as it is on other platforms. To handle the expected crash on Windows when building with asserts, not --crash is required. However on other platforms, not --crash breaks the test in no_asserts builds.

Here, a version of the test's run script specialized for Windows is broken out into a separate BigInt-windows.swift file.

rdar://problem/65251059

@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@slavapestov
Copy link
Contributor

This test will fail on all builders, not just MacOS, when asserts are on. I originally added an 'XFAIL: asserts', but then @compnerd changed it further in this commit:

commit e02438c260083a0ab1239b88ba7d1127bf10c002
Author: Saleem Abdulrasool <[email protected]>
Date:   Thu Jul 2 14:05:29 2020 -0700

    test: repair the Windows builders after #32666
    
    Adjust the test to fail properly

@compnerd Can you investigate why the XFAIL: asserts was not enough on Windows?

@slavapestov
Copy link
Contributor

I think we need to revert e02438c and fix the Windows build separately. This PR will also not work, because "not --crash" is not the right expectation on a no-asserts build. The test passes on a no-asserts build.

@compnerd
Copy link
Member

compnerd commented Jul 9, 2020

@slavapestov the reason that XFAIL: asserts wasn't sufficient on Windows due to a bug in Python :-(. I believe that the underlying issue is fixed in Python 3, which Im still working on getting all the tests ready for.

@nate-chandler nate-chandler force-pushed the rdar65251059 branch 2 times, most recently from 41d9053 to cb998d3 Compare July 9, 2020 22:58
@nate-chandler nate-chandler changed the title [Test] Xfail Prototypes/BigInt.swift when OS=macosx. [Test] Reflect that Prototypes/BigInt.swift builds without asserts. Jul 9, 2020
@nate-chandler
Copy link
Contributor Author

@swift-ci please test and merge

1 similar comment
@nate-chandler
Copy link
Contributor Author

@swift-ci please test and merge

Building the file with asserts crashes the compiler.  Building the file
with no_asserts does *not* crash the compiler.

For non-Windows platforms, it is sufficient to `XFAIL: asserts`.

That does not work on Windows thanks to Python < 3: the crash is not
handled by lit's `not` there as it is on other platforms.  To handle the
expected crash on Windows when building with asserts, not --crash is
required.  However on other platforms, not --crash breaks the test in
no_asserts builds.

Here, a version of the test's run script specialized for Windows is
broken out into a separate BigInt-windows.swift file.

rdar://problem/65251059
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler
Copy link
Contributor Author

@swift-ci please test windows

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - df60ecb4d2fc276e3b08166d2825f5ecdb5ba807

@nate-chandler nate-chandler changed the title [Test] Reflect that Prototypes/BigInt.swift builds without asserts. [Test] Specialize Prototypes/BigInt.swift for Windows. Jul 14, 2020
@nate-chandler
Copy link
Contributor Author

@swift-ci please test windows

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - df60ecb4d2fc276e3b08166d2825f5ecdb5ba807

@nate-chandler
Copy link
Contributor Author

@swift-ci please clean test

@nate-chandler nate-chandler merged commit 5c6c556 into swiftlang:master Jul 14, 2020
@nate-chandler nate-chandler deleted the rdar65251059 branch July 14, 2020 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants