stardot / beebasm

A portable 6502 assembler with BBC Micro style syntax
http://www.retrosoftware.co.uk/wiki/index.php/BeebAsm
GNU General Public License v3.0
83 stars 26 forks source link

Fix tests with CMake when using a separate build directory #92

Closed ccawley2011 closed 8 months ago

mungre commented 8 months ago

Thanks for this. The fix to testrunner.py seems incomplete. The new code os.chdir(os.path.dirname(__file__)) successfully changes to the test directory but the preceding line, which sets beebasm to the location of the beebasm executable, still requires the current directory to be the beebasm directory.

ccawley2011 commented 8 months ago

Thanks for this. The fix to testrunner.py seems incomplete. The new code os.chdir(os.path.dirname(__file__)) successfully changes to the test directory but the preceding line, which sets beebasm to the location of the beebasm executable, still requires the current directory to be the beebasm directory.

That should be implied since CMake launches testrunner.py while the current directory is set to the build directory, which is where the beebasm executable is located.

mungre commented 8 months ago

I see! I was thinking that the change would allow testrunner.py to be agnostic about the current directory, but that would break your use case of having a separate build directory. I'll merge it in.