-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/usr/bin/env bats | ||
# shellcheck disable=SC2034 | ||
BATS_TEST_FILENAME_BASENAME=$(basename "${BATS_TEST_FILENAME}") | ||
# bats file_tags=type:os_specific | ||
|
||
load '../lib/utils.bash' | ||
|
||
@test "get_cpu on linux and version <= 0.26.7 [${BATS_TEST_FILENAME_BASENAME}]" { | ||
if [[ "$OSTYPE" == "darwin"* ]] && [[ "$(uname -m)" == "arm64" ]]; then | ||
skip "Skipping test on darwin/arm64" | ||
fi | ||
cpu=$(get_cpu "0.25.7") | ||
[ "${cpu}" == "x86_64" ] | ||
} | ||
|
||
@test "get_cpu on linux and version > 0.26.7 [${BATS_TEST_FILENAME_BASENAME}]" { | ||
if [[ "$OSTYPE" == "darwin"* ]] && [[ "$(uname -m)" == "arm64" ]]; then | ||
skip "Skipping test on darwin/arm64" | ||
fi | ||
cpu=$(get_cpu "0.26.0") | ||
[ "${cpu}" == "amd64" ] | ||
} | ||
|
||
@test "get_cpu on darwin and version <= 0.26.7 [${BATS_TEST_FILENAME_BASENAME}]" { | ||
if [[ "$OSTYPE" != "darwin"* ]] && [[ "$(uname -m)" != "arm64" ]]; then | ||
skip "Skipping test as not darwin/arm64" | ||
fi | ||
cpu=$(get_cpu "0.25.7") | ||
[ "${cpu}" == "arm64" ] | ||
} | ||
|
||
@test "get_cpu on darwin and version > 0.26.7 [${BATS_TEST_FILENAME_BASENAME}]" { | ||
if [[ "$OSTYPE" != "darwin"* ]] && [[ "$(uname -m)" != "arm64" ]]; then | ||
skip "Skipping test as not darwin/arm64" | ||
fi | ||
cpu=$(get_cpu "0.26.0") | ||
[ "${cpu}" == "arm64" ] | ||
} |