Closed lntrx closed 3 years ago
Is there any way we can test this on CI?
Is there any way we can test this on CI?
I use QEMU + Ubuntu 20 to test Arm64. It's easy to install.
Is there any way we can test this on CI?
Maybe using qemu-aarch64 ?
I added some new modifications, which make it easy to test for both architectures. Output is below
[INFO] Testing ./tests/mutually-recursive-macros.porth for arch x86_64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/mutually-recursive-macros.porth [CMD] /usr/bin/python3 ./porth.py -ARCH x86_64 -I ./tests/ com -r -s ./tests/mutually-recursive-macros.porth [INFO] Testing ./tests/argv.porth for arch x86_64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/argv.porth [CMD] /usr/bin/python3 ./porth.py -ARCH x86_64 -I ./tests/ com -r -s ./tests/argv.porth [INFO] Testing ./tests/include-file-not-found-error.porth for arch x86_64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/include-file-not-found-error.porth [CMD] /usr/bin/python3 ./porth.py -ARCH x86_64 -I ./tests/ com -r -s ./tests/include-file-not-found-error.porth [INFO] Testing ./tests/directly-recursive-macro.porth for arch x86_64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/directly-recursive-macro.porth [CMD] /usr/bin/python3 ./porth.py -ARCH x86_64 -I ./tests/ com -r -s ./tests/directly-recursive-macro.porth [INFO] Testing ./tests/macro-without-end-error.porth for arch x86_64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/macro-without-end-error.porth [CMD] /usr/bin/python3 ./porth.py -ARCH x86_64 -I ./tests/ com -r -s ./tests/macro-without-end-error.porth [INFO] Testing ./tests/no-include-file-error.porth for arch x86_64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/no-include-file-error.porth [CMD] /usr/bin/python3 ./porth.py -ARCH x86_64 -I ./tests/ com -r -s ./tests/no-include-file-error.porth [INFO] Testing ./tests/macro-redefinition-error.porth for arch x86_64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/macro-redefinition-error.porth [CMD] /usr/bin/python3 ./porth.py -ARCH x86_64 -I ./tests/ com -r -s ./tests/macro-redefinition-error.porth [INFO] Testing ./tests/comments.porth for arch x86_64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/comments.porth [CMD] /usr/bin/python3 ./porth.py -ARCH x86_64 -I ./tests/ com -r -s ./tests/comments.porth [INFO] Testing ./tests/macros.porth for arch x86_64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/macros.porth [CMD] /usr/bin/python3 ./porth.py -ARCH x86_64 -I ./tests/ com -r -s ./tests/macros.porth [INFO] Testing ./tests/end-cant-close-error.porth for arch x86_64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/end-cant-close-error.porth [CMD] /usr/bin/python3 ./porth.py -ARCH x86_64 -I ./tests/ com -r -s ./tests/end-cant-close-error.porth [INFO] Testing ./tests/wrong-include-path-type-error.porth for arch x86_64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/wrong-include-path-type-error.porth [CMD] /usr/bin/python3 ./porth.py -ARCH x86_64 -I ./tests/ com -r -s ./tests/wrong-include-path-type-error.porth [INFO] Testing ./tests/bitwise.porth for arch x86_64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/bitwise.porth [CMD] /usr/bin/python3 ./porth.py -ARCH x86_64 -I ./tests/ com -r -s ./tests/bitwise.porth [INFO] Testing ./tests/comparison.porth for arch x86_64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/comparison.porth [CMD] /usr/bin/python3 ./porth.py -ARCH x86_64 -I ./tests/ com -r -s ./tests/comparison.porth [INFO] Testing ./tests/no-macro-name-error.porth for arch x86_64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/no-macro-name-error.porth [CMD] /usr/bin/python3 ./porth.py -ARCH x86_64 -I ./tests/ com -r -s ./tests/no-macro-name-error.porth [INFO] Testing ./tests/unclosed-character-literal-error.porth for arch x86_64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/unclosed-character-literal-error.porth [CMD] /usr/bin/python3 ./porth.py -ARCH x86_64 -I ./tests/ com -r -s ./tests/unclosed-character-literal-error.porth [INFO] Testing ./tests/arithmetics.porth for arch x86_64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/arithmetics.porth [CMD] /usr/bin/python3 ./porth.py -ARCH x86_64 -I ./tests/ com -r -s ./tests/arithmetics.porth [INFO] Testing ./tests/intrinsic-redefinition-error.porth for arch x86_64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/intrinsic-redefinition-error.porth [CMD] /usr/bin/python3 ./porth.py -ARCH x86_64 -I ./tests/ com -r -s ./tests/intrinsic-redefinition-error.porth [INFO] Testing ./tests/else-not-inside-if-error.porth for arch x86_64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/else-not-inside-if-error.porth [CMD] /usr/bin/python3 ./porth.py -ARCH x86_64 -I ./tests/ com -r -s ./tests/else-not-inside-if-error.porth [INFO] Testing ./tests/dead-recursive-macro.porth for arch x86_64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/dead-recursive-macro.porth [CMD] /usr/bin/python3 ./porth.py -ARCH x86_64 -I ./tests/ com -r -s ./tests/dead-recursive-macro.porth [INFO] Testing ./tests/unclosed-block-error.porth for arch x86_64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/unclosed-block-error.porth [CMD] /usr/bin/python3 ./porth.py -ARCH x86_64 -I ./tests/ com -r -s ./tests/unclosed-block-error.porth [INFO] Testing ./tests/memory.porth for arch x86_64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/memory.porth [CMD] /usr/bin/python3 ./porth.py -ARCH x86_64 -I ./tests/ com -r -s ./tests/memory.porth [INFO] Testing ./tests/stack.porth for arch x86_64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/stack.porth [CMD] /usr/bin/python3 ./porth.py -ARCH x86_64 -I ./tests/ com -r -s ./tests/stack.porth [INFO] Testing ./tests/wrong-macro-name-type-error.porth for arch x86_64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/wrong-macro-name-type-error.porth [CMD] /usr/bin/python3 ./porth.py -ARCH x86_64 -I ./tests/ com -r -s ./tests/wrong-macro-name-type-error.porth [INFO] Testing ./tests/self-including-file.porth for arch x86_64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/self-including-file.porth [CMD] /usr/bin/python3 ./porth.py -ARCH x86_64 -I ./tests/ com -r -s ./tests/self-including-file.porth [INFO] Testing ./tests/unknown-word-error.porth for arch x86_64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/unknown-word-error.porth [CMD] /usr/bin/python3 ./porth.py -ARCH x86_64 -I ./tests/ com -r -s ./tests/unknown-word-error.porth [INFO] Testing ./tests/multi-byte-character-literal-error.porth for arch x86_64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/multi-byte-character-literal-error.porth [CMD] /usr/bin/python3 ./porth.py -ARCH x86_64 -I ./tests/ com -r -s ./tests/multi-byte-character-literal-error.porth [INFO] Testing ./tests/control-flow.porth for arch x86_64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/control-flow.porth [CMD] /usr/bin/python3 ./porth.py -ARCH x86_64 -I ./tests/ com -r -s ./tests/control-flow.porth [INFO] Testing ./tests/unclosed-string-literal-error.porth for arch x86_64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/unclosed-string-literal-error.porth [CMD] /usr/bin/python3 ./porth.py -ARCH x86_64 -I ./tests/ com -r -s ./tests/unclosed-string-literal-error.porth [INFO] Testing ./tests/mutually-recursive-macros.porth for arch aarch64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/mutually-recursive-macros.porth [CMD] /usr/bin/python3 ./porth.py -ARCH aarch64 -I ./tests/ com -r -s ./tests/mutually-recursive-macros.porth [INFO] Testing ./tests/argv.porth for arch aarch64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/argv.porth [CMD] /usr/bin/python3 ./porth.py -ARCH aarch64 -I ./tests/ com -r -s ./tests/argv.porth [INFO] Testing ./tests/include-file-not-found-error.porth for arch aarch64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/include-file-not-found-error.porth [CMD] /usr/bin/python3 ./porth.py -ARCH aarch64 -I ./tests/ com -r -s ./tests/include-file-not-found-error.porth [INFO] Testing ./tests/directly-recursive-macro.porth for arch aarch64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/directly-recursive-macro.porth [CMD] /usr/bin/python3 ./porth.py -ARCH aarch64 -I ./tests/ com -r -s ./tests/directly-recursive-macro.porth [INFO] Testing ./tests/macro-without-end-error.porth for arch aarch64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/macro-without-end-error.porth [CMD] /usr/bin/python3 ./porth.py -ARCH aarch64 -I ./tests/ com -r -s ./tests/macro-without-end-error.porth [INFO] Testing ./tests/no-include-file-error.porth for arch aarch64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/no-include-file-error.porth [CMD] /usr/bin/python3 ./porth.py -ARCH aarch64 -I ./tests/ com -r -s ./tests/no-include-file-error.porth [INFO] Testing ./tests/macro-redefinition-error.porth for arch aarch64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/macro-redefinition-error.porth [CMD] /usr/bin/python3 ./porth.py -ARCH aarch64 -I ./tests/ com -r -s ./tests/macro-redefinition-error.porth [INFO] Testing ./tests/comments.porth for arch aarch64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/comments.porth [CMD] /usr/bin/python3 ./porth.py -ARCH aarch64 -I ./tests/ com -r -s ./tests/comments.porth [INFO] Testing ./tests/macros.porth for arch aarch64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/macros.porth [CMD] /usr/bin/python3 ./porth.py -ARCH aarch64 -I ./tests/ com -r -s ./tests/macros.porth [INFO] Testing ./tests/end-cant-close-error.porth for arch aarch64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/end-cant-close-error.porth [CMD] /usr/bin/python3 ./porth.py -ARCH aarch64 -I ./tests/ com -r -s ./tests/end-cant-close-error.porth [INFO] Testing ./tests/wrong-include-path-type-error.porth for arch aarch64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/wrong-include-path-type-error.porth [CMD] /usr/bin/python3 ./porth.py -ARCH aarch64 -I ./tests/ com -r -s ./tests/wrong-include-path-type-error.porth [INFO] Testing ./tests/bitwise.porth for arch aarch64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/bitwise.porth [CMD] /usr/bin/python3 ./porth.py -ARCH aarch64 -I ./tests/ com -r -s ./tests/bitwise.porth [INFO] Testing ./tests/comparison.porth for arch aarch64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/comparison.porth [CMD] /usr/bin/python3 ./porth.py -ARCH aarch64 -I ./tests/ com -r -s ./tests/comparison.porth [INFO] Testing ./tests/no-macro-name-error.porth for arch aarch64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/no-macro-name-error.porth [CMD] /usr/bin/python3 ./porth.py -ARCH aarch64 -I ./tests/ com -r -s ./tests/no-macro-name-error.porth [INFO] Testing ./tests/unclosed-character-literal-error.porth for arch aarch64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/unclosed-character-literal-error.porth [CMD] /usr/bin/python3 ./porth.py -ARCH aarch64 -I ./tests/ com -r -s ./tests/unclosed-character-literal-error.porth [INFO] Testing ./tests/arithmetics.porth for arch aarch64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/arithmetics.porth [CMD] /usr/bin/python3 ./porth.py -ARCH aarch64 -I ./tests/ com -r -s ./tests/arithmetics.porth [INFO] Testing ./tests/intrinsic-redefinition-error.porth for arch aarch64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/intrinsic-redefinition-error.porth [CMD] /usr/bin/python3 ./porth.py -ARCH aarch64 -I ./tests/ com -r -s ./tests/intrinsic-redefinition-error.porth [INFO] Testing ./tests/else-not-inside-if-error.porth for arch aarch64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/else-not-inside-if-error.porth [CMD] /usr/bin/python3 ./porth.py -ARCH aarch64 -I ./tests/ com -r -s ./tests/else-not-inside-if-error.porth [INFO] Testing ./tests/dead-recursive-macro.porth for arch aarch64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/dead-recursive-macro.porth [CMD] /usr/bin/python3 ./porth.py -ARCH aarch64 -I ./tests/ com -r -s ./tests/dead-recursive-macro.porth [INFO] Testing ./tests/unclosed-block-error.porth for arch aarch64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/unclosed-block-error.porth [CMD] /usr/bin/python3 ./porth.py -ARCH aarch64 -I ./tests/ com -r -s ./tests/unclosed-block-error.porth [INFO] Testing ./tests/memory.porth for arch aarch64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/memory.porth [CMD] /usr/bin/python3 ./porth.py -ARCH aarch64 -I ./tests/ com -r -s ./tests/memory.porth [INFO] Testing ./tests/stack.porth for arch aarch64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/stack.porth [CMD] /usr/bin/python3 ./porth.py -ARCH aarch64 -I ./tests/ com -r -s ./tests/stack.porth [INFO] Testing ./tests/wrong-macro-name-type-error.porth for arch aarch64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/wrong-macro-name-type-error.porth [CMD] /usr/bin/python3 ./porth.py -ARCH aarch64 -I ./tests/ com -r -s ./tests/wrong-macro-name-type-error.porth [INFO] Testing ./tests/self-including-file.porth for arch aarch64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/self-including-file.porth [CMD] /usr/bin/python3 ./porth.py -ARCH aarch64 -I ./tests/ com -r -s ./tests/self-including-file.porth [INFO] Testing ./tests/unknown-word-error.porth for arch aarch64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/unknown-word-error.porth [CMD] /usr/bin/python3 ./porth.py -ARCH aarch64 -I ./tests/ com -r -s ./tests/unknown-word-error.porth [INFO] Testing ./tests/multi-byte-character-literal-error.porth for arch aarch64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/multi-byte-character-literal-error.porth [CMD] /usr/bin/python3 ./porth.py -ARCH aarch64 -I ./tests/ com -r -s ./tests/multi-byte-character-literal-error.porth [INFO] Testing ./tests/control-flow.porth for arch aarch64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/control-flow.porth [CMD] /usr/bin/python3 ./porth.py -ARCH aarch64 -I ./tests/ com -r -s ./tests/control-flow.porth [INFO] Testing ./tests/unclosed-string-literal-error.porth for arch aarch64 [CMD] /usr/bin/python3 ./porth.py -I ./tests/ sim ./tests/unclosed-string-literal-error.porth [CMD] /usr/bin/python3 ./porth.py -ARCH aarch64 -I ./tests/ com -r -s ./tests/unclosed-string-literal-error.porth
Simulation failed: 0, Compilation failed: 0
Is there any way we can test this on CI?
Does CI allow for custom Docker images? Maybe an arm64 cross-assembler would work.
Is there any way we can test this on CI?
Does CI allow for custom Docker images? Maybe an arm64 cross-assembler would work.
Actually I didn't now CI exist until Tsoding ask it about. I am sorry I haven't used GitHub so actively. I am not sure how CI works.
Hello guys @rexim @SeanMcG ,
I made some undoes. Right now it only adds arm64 support. Unfortunately it's a must to separate x86 and arm64 syscall files. For default I added 'include "syscall_x86.porth" to std.porth' I merged new changes. So there should be no conflict whatsoever.
For CI testing I suggest to use qemu-x86_64 and qemu-aarch64. @SeanMcG could you review it!
I think it would be best to make an unistd.porth and make some sort of conditional compilation to add arch spesific syscalls.
As per CONTRIBUTING.md
I know @rexim is not currently looking for MRs for this project as it is still "in flux".
I'll with-hold commentary on this patchset for now, but I would like to add that I am using your architecture framework to port this to powerpc64 as well.
either arm64 or x86_64 right now. Default value is platform.arch(). Arm64 uses
aarch64-linux-gnu-as
assembler.