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

Fix misuse of CMAKE_SIZEOF_VOID_P in testing #79095

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions test/stdlib/NumericParsing.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
//===----------------------------------------------------------------------===//
// -*- swift -*-
// RUN: %empty-directory(%t)
// RUN: %gyb -DCMAKE_SIZEOF_VOID_P=%target-ptrsize %s -o %t/NumericParsing.swift
// RUN: %gyb -DWORD_BITS=%target-ptrsize %s -o %t/NumericParsing.swift
// RUN: %line-directive %t/NumericParsing.swift -- %target-build-swift %t/NumericParsing.swift -o %t/a.out
// RUN: %target-codesign %t/a.out
// RUN: %line-directive %t/NumericParsing.swift -- %target-run %t/a.out
// REQUIRES: executable_test
%{
from SwiftIntTypes import all_integer_types

word_bits = int(CMAKE_SIZEOF_VOID_P)
word_bits = int(WORD_BITS)

def maskOfWidth(n):
return (1 << n) - 1
Expand Down
2 changes: 1 addition & 1 deletion test/stdlib/NumericParsing2.swift.gyb
Copy link
Contributor Author

Choose a reason for hiding this comment

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

[note for reviewers] Since it seems we didn't use the flag in this file, let me remove it instead of fixing the flag.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//===----------------------------------------------------------------------===//
// -*- swift -*-
// RUN: %empty-directory(%t)
// RUN: %gyb -DCMAKE_SIZEOF_VOID_P=%target-ptrsize %s -o %t/NumericParsing.swift
// RUN: %gyb %s -o %t/NumericParsing.swift
// RUN: %line-directive %t/NumericParsing.swift -- %target-build-swift %t/NumericParsing.swift -o %t/a.out
// RUN: %target-codesign %t/a.out
// RUN: %line-directive %t/NumericParsing.swift -- %target-run %t/a.out
Expand Down
2 changes: 1 addition & 1 deletion test/stdlib/SIMDConcreteFP.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//
//===----------------------------------------------------------------------===//
// RUN: %empty-directory(%t)
// RUN: %gyb -DCMAKE_SIZEOF_VOID_P=%target-ptrsize %s -o %t/SIMDConcreteFP.swift
// RUN: %gyb %s -o %t/SIMDConcreteFP.swift
// RUN: %line-directive %t/SIMDConcreteFP.swift -- %target-build-swift %t/SIMDConcreteFP.swift -o %t/a.out
// RUN: %target-codesign %t/a.out
// RUN: %line-directive %t/SIMDConcreteFP.swift -- %target-run %t/a.out
Expand Down
4 changes: 2 additions & 2 deletions test/stdlib/SIMDConcreteIntegers.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//
//===----------------------------------------------------------------------===//
// RUN: %empty-directory(%t)
// RUN: %gyb -DCMAKE_SIZEOF_VOID_P=%target-ptrsize %s -o %t/SIMDConcreteIntegers.swift
// RUN: %gyb -DWORD_BITS=%target-ptrsize %s -o %t/SIMDConcreteIntegers.swift
// RUN: %line-directive %t/SIMDConcreteIntegers.swift -- %target-build-swift %t/SIMDConcreteIntegers.swift -o %t/a.out
// RUN: %target-codesign %t/a.out
// RUN: %line-directive %t/SIMDConcreteIntegers.swift -- %target-run %t/a.out
Expand All @@ -21,7 +21,7 @@ import StdlibUnittest

%{
from SwiftIntTypes import all_integer_types
word_bits = int(CMAKE_SIZEOF_VOID_P) * 8
word_bits = int(WORD_BITS)
storagescalarCounts = [2,4,8,16,32,64]
vectorscalarCounts = storagescalarCounts + [3]
}%
Expand Down
4 changes: 2 additions & 2 deletions test/stdlib/SIMDConcreteMasks.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//
//===----------------------------------------------------------------------===//
// RUN: %empty-directory(%t)
// RUN: %gyb -DCMAKE_SIZEOF_VOID_P=%target-ptrsize %s -o %t/SIMDConcreteMasks.swift
// RUN: %gyb -DWORD_BITS=%target-ptrsize %s -o %t/SIMDConcreteMasks.swift
// RUN: %line-directive %t/SIMDConcreteMasks.swift -- %target-build-swift %t/SIMDConcreteMasks.swift -o %t/a.out
// RUN: %target-codesign %t/a.out
// RUN: %line-directive %t/SIMDConcreteMasks.swift -- %target-run %t/a.out
Expand All @@ -21,7 +21,7 @@ import StdlibUnittest

%{
from SwiftIntTypes import all_integer_types
word_bits = int(CMAKE_SIZEOF_VOID_P) * 8
word_bits = int(WORD_BITS)
storagescalarCounts = [2,4,8,16,32,64]
vectorscalarCounts = storagescalarCounts + [3]
}%
Expand Down