From 2d4ddb1820122cd8e7d42185f2ea80330c63d4f6 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Sat, 2 Oct 2021 20:31:11 +0100 Subject: Introduced config.env One config to rule the whole build system and the tests. --- tests/Makefile | 3 +++ tests/test_rom.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/Makefile b/tests/Makefile index 6c1a9a4..2d741fa 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,6 +1,9 @@ default: $(error Please use the Makefile from root directory) +include ../config.env +export $(shell sed 's/=.*//' ../config.env) + 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): -- cgit v1.2.3