1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-01 13:50:36 +00:00
Commit graph

12 commits

Author SHA1 Message Date
Matthew Kilgore 21b7d60f44 Fix -o to be relative to _STARTDIR$ when source file is
In 094a8c82 we added the ability to compile a source file relative to
_STARTDIR$ instead of the location of the qb64pe executable. This change
fixes `-o` so that it is also treated as relative to _STARTDIR$ when the
provided source file is.

Note that this is not a real behavior change because if the provided
source file is relative to the qb64pe executable then `-o` will be as
well, which matches the previous behavior. The cases where it is made
relative to _STARTDIR$ all produced errors until 094a8c82 was done, so
there was no previous defined behavior.
2022-10-01 04:24:54 -04:00
Matthew Kilgore 094a8c82b2 Fix compiling bas files relative to the CWD
Fix was pulled from QB64Official/qb64#17 by Cory Smith, I just added
tests around it.

Most (all?) compilers allow you to run the compiler from a separate
directory than the compiler itself is located in and compile source
files relative to that directory. QB64-PE however does not allow that,
for a variety of reasons it always search for the provided source file
relative to the location of the QB64-PE compiler rather than the CWD it
was run from. This is pretty unexpected behavior in a lot of cases, and
also doesn't give very helpful error messages either.

This change has us check if the source file exists at the given CWD
location, and if it does we will prepend the CWD to produce the correct
path to the file.

To test that this behavior works as expected I modified
`compile_test.sh` to compile from within the test directories using a
relative path directly to the test file, this fails with current QB64-PE
versions because it can't find the source file.

Additionally, I was unsure of whether this would impact the behavior of
`'$include`, so I added some tests around include that uses various
combinations of paths relative to QB64-PE and relative to the source
file being compiled, and they all find the files as expected so I think
it's fine.
2022-09-30 17:13:43 -04:00
Matthew Kilgore 2deac87b60 Fix Linux build agent audio problems
It's still not entirely clear what the underlying issue is, but the ALSA
device provided by pulseaudio stops working after so many tests use it.
I've tried various approaches, but simply restarting pulseaudio after
every test is a bruteforce but successful solution. In practice it also
doesn't have any noticeable performance penalty, so it seems like a file
solution.

The `CI_TESTING` environment variable is used to avoid restarting
pulseaudio if the tests aren't being run in the CI environment (we don't
want to restart your pulseaudio instance if you're running them locally!)
2022-09-17 02:41:22 -04:00
Matthew Kilgore adb52f4f04 Add support for custom flags on QB64 tests 2022-09-04 23:35:14 -04:00
Matthew Kilgore 65db95c876 Add support for error tests
This adds support for tests of the error output of QB64-PE. The tests
are in the form of a `.bas` file that does not compile, and a `.err`
file containing the expected output of QB64-PE when producing an error
for that file.

Additionally the `compile_tests` now support multiple tests in a single
folder, via using multiple `.bas` files with different names.
2022-09-04 22:43:30 -04:00
Matthew Kilgore 9e2177deff Allow EXE name to have spaces in it
Makefile's generally hate spaces in filenames, and it's largely
impossible to make them work. Due to that, with the change to use a
`Makefile` the `EXE=` parameter did not work with spaces, and programs
such as "foo bar.bas" would not compile because it produces "foo
bar.exe" which has a space in the name.

There were options here, but in this very specific case it is actually
possible to allow the Makefile to work with spaces. `EXE` is only a
single filename, so as long as we always quote it correctly and the
provided `EXE=` parameter escapes the spaces with `\` then it will work.

Thus, we modified the Makefile to always do the quoting, and modified
QB64 to automatically escape the spaces in the executable name provided
to the Makefile.

I also modified the `compile_tests` to test that spaces in filenames and
paths of the executable correctly compile.

Fixes: #80
2022-05-22 23:59:06 -04:00
Matthew Kilgore 4a8a7ce594 Redirect stderr to compilelog rather than errorcompilelog
Having two separate files for the compile output is just too confusing,
and it adds an extra file users need to look at and give us when there
are issues. This change simply makes qb64.bas send both the stdout and
stderr output to compilelog.txt.

Fixes: #61
2022-05-18 09:20:30 -04:00
Matthew Kilgore 60cb0c6f82 Clear ./internal/temp between each test 2022-05-12 00:21:02 -04:00
Matthew Kilgore 867dddb1b4 Only copy compilelog files if they exist 2022-05-12 00:21:02 -04:00
Matthew Kilgore 23ef0aeca8 Add more tests and dynamic library support 2022-05-12 00:21:02 -04:00
Matthew Kilgore b413028619 Retore errocompilelog, put exes in separate directory
The purpose of moving the EXEs is so that they are not captured in the
build artifacts. They would be nice to have, but they end up being a few
hundred MBs in size so much too large to bother saving.
2022-05-12 00:21:02 -04:00
Matthew Kilgore b89e388c2f Add Compilation tests for different dependencies
These tests check that we can compile programs that use a variety of
different sets of dependencies. Each program will only be compiled with
the set of dependencies it relies on.
2022-04-28 23:00:06 -04:00