diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/common.sh | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/common.sh b/tests/common.sh index 80e0bea..f863826 100644 --- a/tests/common.sh +++ b/tests/common.sh @@ -1,9 +1,20 @@ #!/bin/bash function assemble() { - # Note: macOS only for now, abstract this out later - nasm -f macho64 -o output.o output.nasm - ld -lSystem output.o + case "$(uname -s)" in + Darwin) + set -e + nasm -f macho64 -o output.nasm.o output.nasm + ld -lSystem output.nasm.o + set +e + ;; + Linux) + set -e + nasm -f elf64 -o output.nasm.o output.nasm + ld output.nasm.o + set +e + ;; + esac } function assert_exit_status() { |