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

#166 Handling Power PC architecture #167

Merged
merged 1 commit into from
Apr 23, 2021
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
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ open class PlatformHelper constructor(private val props: Properties = System.get
*/
arch == "arm" || arch.startsWith("aarch") -> property("uname")
.mapIf({ it == "armv8l" || it == "aarch64" }) { "arm64" }
arch == "ppc64le" -> "ppc64le"
arch.contains("64") -> "x64"
else -> "x86"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@ class PlatformHelperTest extends Specification {
this.helper.isWindows() == isWindows

where:
osProp | archProp | osName | osArch | isWindows
'Windows 8' | 'x86' | 'win' | 'x86' | true
'Windows 8' | 'x86_64' | 'win' | 'x64' | true
'Mac OS X' | 'x86' | 'darwin' | 'x86' | false
'Mac OS X' | 'x86_64' | 'darwin' | 'x64' | false
'Linux' | 'x86' | 'linux' | 'x86' | false
'Linux' | 'x86_64' | 'linux' | 'x64' | false
'SunOS' | 'x86' | 'sunos' | 'x86' | false
'SunOS' | 'x86_64' | 'sunos' | 'x64' | false
osProp | archProp | osName | osArch | isWindows
'Windows 8' | 'x86' | 'win' | 'x86' | true
'Windows 8' | 'x86_64' | 'win' | 'x64' | true
'Mac OS X' | 'x86' | 'darwin' | 'x86' | false
'Mac OS X' | 'x86_64' | 'darwin' | 'x64' | false
'Linux' | 'x86' | 'linux' | 'x86' | false
'Linux' | 'x86_64' | 'linux' | 'x64' | false
'Linux' | 'ppc64le' | 'linux' | 'ppc64le' | false
'SunOS' | 'x86' | 'sunos' | 'x86' | false
'SunOS' | 'x86_64' | 'sunos' | 'x64' | false
}

@Unroll
Expand All @@ -53,6 +54,7 @@ class PlatformHelperTest extends Specification {
'aarch32' | 'arm' | 'arm'
'aarch64' | 'arm64' | 'arm64'
'aarch64' | 'aarch64' | 'arm64'
'ppc64le' | 'ppc64le' | 'ppc64le'
}

def "throw exception if unsupported os"() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,16 @@ class VariantComputerTest extends Specification {
computedNpxScriptFile.get().toString().endsWith(NODE_BASE_PATH + nodeDir + PS + "lib${PS}node_modules${PS}npm${PS}bin${PS}npx-cli.js")

where:
osName | osArch | nodeDir | depName
'Linux' | 'x86' | 'node-v5.12.0-linux-x86' | 'org.nodejs:node:5.12.0:[email protected]'
'Linux' | 'x86_64' | 'node-v5.12.0-linux-x64' | 'org.nodejs:node:5.12.0:[email protected]'
'Mac OS X' | 'x86' | 'node-v5.12.0-darwin-x86' | 'org.nodejs:node:5.12.0:[email protected]'
'Mac OS X' | 'x86_64' | 'node-v5.12.0-darwin-x64' | 'org.nodejs:node:5.12.0:[email protected]'
'FreeBSD' | 'x86' | 'node-v5.12.0-linux-x86' | 'org.nodejs:node:5.12.0:[email protected]'
'FreeBSD' | 'x86_64' | 'node-v5.12.0-linux-x64' | 'org.nodejs:node:5.12.0:[email protected]'
'SunOS' | 'x86' | 'node-v5.12.0-sunos-x86' | 'org.nodejs:node:5.12.0:[email protected]'
'SunOS' | 'x86_64' | 'node-v5.12.0-sunos-x64' | 'org.nodejs:node:5.12.0:[email protected]'
osName | osArch | nodeDir | depName
'Linux' | 'x86' | 'node-v5.12.0-linux-x86' | 'org.nodejs:node:5.12.0:[email protected]'
'Linux' | 'x86_64' | 'node-v5.12.0-linux-x64' | 'org.nodejs:node:5.12.0:[email protected]'
'Linux' | 'ppc64le' | 'node-v5.12.0-linux-ppc64le' | 'org.nodejs:node:5.12.0:[email protected]'
'Mac OS X' | 'x86' | 'node-v5.12.0-darwin-x86' | 'org.nodejs:node:5.12.0:[email protected]'
'Mac OS X' | 'x86_64' | 'node-v5.12.0-darwin-x64' | 'org.nodejs:node:5.12.0:[email protected]'
'FreeBSD' | 'x86' | 'node-v5.12.0-linux-x86' | 'org.nodejs:node:5.12.0:[email protected]'
'FreeBSD' | 'x86_64' | 'node-v5.12.0-linux-x64' | 'org.nodejs:node:5.12.0:[email protected]'
'SunOS' | 'x86' | 'node-v5.12.0-sunos-x86' | 'org.nodejs:node:5.12.0:[email protected]'
'SunOS' | 'x86_64' | 'node-v5.12.0-sunos-x64' | 'org.nodejs:node:5.12.0:[email protected]'
}

@Unroll
Expand Down Expand Up @@ -144,10 +145,11 @@ class VariantComputerTest extends Specification {
computedNpxScriptFile.get().toString().endsWith(NODE_BASE_PATH + nodeDir + PS + "lib${PS}node_modules${PS}npm${PS}bin${PS}npx-cli.js")

where:
osName | osArch | sysOsArch | nodeDir | depName
'Linux' | 'arm' | 'armv6l' | 'node-v5.12.0-linux-armv6l' | 'org.nodejs:node:5.12.0:[email protected]'
'Linux' | 'arm' | 'armv7l' | 'node-v5.12.0-linux-armv7l' | 'org.nodejs:node:5.12.0:[email protected]'
'Linux' | 'arm' | 'arm64' | 'node-v5.12.0-linux-arm64' | 'org.nodejs:node:5.12.0:[email protected]'
osName | osArch | sysOsArch | nodeDir | depName
'Linux' | 'arm' | 'armv6l' | 'node-v5.12.0-linux-armv6l' | 'org.nodejs:node:5.12.0:[email protected]'
'Linux' | 'arm' | 'armv7l' | 'node-v5.12.0-linux-armv7l' | 'org.nodejs:node:5.12.0:[email protected]'
'Linux' | 'arm' | 'arm64' | 'node-v5.12.0-linux-arm64' | 'org.nodejs:node:5.12.0:[email protected]'
'Linux' | 'ppc64le' | 'ppc64le' | 'node-v5.12.0-linux-ppc64le' | 'org.nodejs:node:5.12.0:[email protected]'
}

@Unroll
Expand Down