diff options
| author | Paul Oliver <contact@pauloliver.dev> | 2026-07-07 23:30:52 +0200 |
|---|---|---|
| committer | Paul Oliver <contact@pauloliver.dev> | 2026-07-07 23:30:52 +0200 |
| commit | a1569a33cec28b2ea874ae02fcf5863454586b30 (patch) | |
| tree | 4ff6ef1ab200cc9dafe86fd832041ea623976eb1 /test/test_build.py | |
| parent | 55928b51596de4cd1b7a2783529ecda3ff3087ce (diff) | |
data-tests (WIP)more_tests
Diffstat (limited to 'test/test_build.py')
| -rw-r--r-- | test/test_build.py | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/test/test_build.py b/test/test_build.py index ec23390..96da14e 100644 --- a/test/test_build.py +++ b/test/test_build.py @@ -3,12 +3,12 @@ import signal from test_general import SalisTest -class TestBuild(SalisTest): - NAME = "test-build.sim" +SIM_NAME = "test-build.sim" +class TestBuild(SalisTest): def cmds_new(self, anc, arch): return ( - f"./salis.py new -a{anc} -b -f -g{compiler} -H{self.tempdir.name} -n{TestBuild.NAME} {optimized} -s{seed} -u{ui} -v{arch}" + f"./salis.py new -a{anc} -b -f -g{compiler} -H{self.tempdir.name} -n{SIM_NAME} {optimized} -s{seed} -u{ui} -v{arch}" for compiler in ["clang", "gcc"] for optimized in ["", "-o"] for seed in [-1, 0, 1234] @@ -23,7 +23,7 @@ class TestBuild(SalisTest): def cmds_load(self): return ( - f"./salis.py load -b -g{compiler} -H{self.tempdir.name} -n{TestBuild.NAME} {optimized} -u{ui}" + f"./salis.py load -b -g{compiler} -H{self.tempdir.name} -n{SIM_NAME} {optimized} -u{ui}" for compiler in ["clang", "gcc"] for optimized in ["", "-o"] for ui in ["curses", "daemon"] @@ -31,7 +31,7 @@ class TestBuild(SalisTest): def cmds_server(self): return ( - f"./salis.py server -b -g{compiler} -H{self.tempdir.name} -n{TestBuild.NAME} {optimized}" + f"./salis.py server -b -g{compiler} -H{self.tempdir.name} -n{SIM_NAME} {optimized}" for compiler in ["clang", "gcc"] for optimized in ["", "-o"] ) @@ -44,44 +44,44 @@ class TestBuild(SalisTest): for optimized in ["", "-o"] ) - def file_list(self): + def files_on_build(self): return [ - os.path.join(self.tempdir.name, TestBuild.NAME, "opts.json"), + os.path.join(self.tempdir.name, SIM_NAME, "opts.json"), ] def test_null_new(self): for cmd in self.cmds_new_null(): SalisTest.run_subprocess(cmd) - self.assert_file_list_exists(self.file_list()) + self.assert_file_list_exists(self.files_on_build()) def test_v1_new(self): for cmd in self.cmds_new_v1(): SalisTest.run_subprocess(cmd) - self.assert_file_list_exists(self.file_list()) + self.assert_file_list_exists(self.files_on_build()) def test_null_load(self): SalisTest.run_subprocess(next(self.cmds_new_null())) - self.assert_file_list_exists(self.file_list()) + self.assert_file_list_exists(self.files_on_build()) for cmd in self.cmds_load(): SalisTest.run_subprocess(cmd) - self.assert_file_list_exists(self.file_list()) + self.assert_file_list_exists(self.files_on_build()) def test_v1_load(self): SalisTest.run_subprocess(next(self.cmds_new_v1())) - self.assert_file_list_exists(self.file_list()) + self.assert_file_list_exists(self.files_on_build()) for cmd in self.cmds_load(): SalisTest.run_subprocess(cmd) - self.assert_file_list_exists(self.file_list()) + self.assert_file_list_exists(self.files_on_build()) def test_server(self): SalisTest.run_subprocess(next(self.cmds_new_null())) - self.assert_file_list_exists(self.file_list()) + self.assert_file_list_exists(self.files_on_build()) for cmd in self.cmds_server(): SalisTest.run_subprocess(cmd) - self.assert_file_list_exists(self.file_list()) + self.assert_file_list_exists(self.files_on_build()) @SalisTest.run_ui_test(anc="0123", anc_path="anc", name="def.sim", ui="null", ui_path="test/ui", vm_arch="null") def test_client(self): |
