-
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #99 from ocean/reorganise-makefile
chore: Realign binary naming & ldflags
- Loading branch information
Showing
3 changed files
with
53 additions
and
26 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
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
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,31 @@ | ||
#!/usr/bin/env bats | ||
|
||
load 'test_helpers/bats-support/load' | ||
load 'test_helpers/bats-assert/load' | ||
|
||
@test "test cross compilation command lifecycle" { | ||
run make clean | ||
assert_success | ||
assert_output --partial 'rm -vRf ./builds/ahoy-bin-*' | ||
|
||
run ls ./builds/ahoy-* | ||
assert_failure | ||
assert_output --partial 'No such file' | ||
|
||
run make cross | ||
assert_success | ||
assert_output --partial 'mv ./builds/ahoy-bin-windows-amd64 ./builds/ahoy-bin-windows-amd64.exe; mv ./builds/ahoy-bin-windows-arm64 ./builds/ahoy-bin-windows-arm64.exe;' | ||
|
||
run ls ./builds/ahoy-* | ||
assert_output --partial 'ahoy-bin-darwin-amd64' | ||
assert_output --partial 'ahoy-bin-linux-arm64' | ||
assert_output --partial 'ahoy-bin-windows-amd64.exe' | ||
|
||
run make clean | ||
assert_success | ||
assert_output --partial 'rm -vRf ./builds/ahoy-bin-*' | ||
|
||
run ls ./builds/ahoy-* | ||
assert_failure | ||
assert_output --partial 'No such file' | ||
} |