aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJuan J. Martínez <jjm@usebox.net>2021-10-02 20:08:15 +0000
committerJuan J. Martínez <jjm@usebox.net>2021-10-02 20:08:15 +0000
commit32ecf3da770e2f4a1dcdafd00bcf2a3d0d5751d2 (patch)
tree9cb94ffc3bc68f0d998e8881592b160aa4fcdf67 /tests
parent5763dc7aa0b0fc44d9776f582b692d086f8b5b6d (diff)
parent271902c4c9b85137cf223e62ba7196cccfcb7479 (diff)
downloadubox-msx-lib-32ecf3da770e2f4a1dcdafd00bcf2a3d0d5751d2.tar.gz
ubox-msx-lib-32ecf3da770e2f4a1dcdafd00bcf2a3d0d5751d2.zip
Merge branch 'config-env' into 'master'
Introduced config.env See merge request reidrac/ubox-msx-lib!15
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile3
-rwxr-xr-xtests/test_rom.py4
2 files changed, 5 insertions, 2 deletions
diff --git a/tests/Makefile b/tests/Makefile
index 6c1a9a4..32933e0 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -1,6 +1,9 @@
default:
$(error Please use the Makefile from root directory)
+include ../config.env
+.EXPORT_ALL_VARIABLES: test
+
TESTS := $(wildcard test_*.py)
test:
diff --git a/tests/test_rom.py b/tests/test_rom.py
index a2148e1..d980dad 100755
--- a/tests/test_rom.py
+++ b/tests/test_rom.py
@@ -2,13 +2,13 @@
import unittest
import struct
-from os import path
+from os import path, environ
class TestRom(unittest.TestCase):
"""Test that the generated game ROM is correct."""
- ROM_SIZE = 0x8000
+ ROM_SIZE = int(environ.get("ROM_MAX", 0), 16)
@classmethod
def setUpClass(cls):