tests: Drop primitive DSP test

This commit is contained in:
Matt Borgerson
2026-03-20 13:09:34 -07:00
committed by mborgerson
parent 7252d8ed49
commit a34bb0f8c2
8 changed files with 0 additions and 135 deletions
-6
View File
@@ -142,12 +142,6 @@ jobs:
mkdir -p deb
mv *.deb *.ddeb deb
- name: Test
run: |
pushd src/build
./pyvenv/bin/meson compile test-xbox
./pyvenv/bin/meson test --suite xbox --no-rebuild
popd
- name: Report ccache stats
run: ccache -s
- name: Generate AppImage
-1
View File
@@ -89,4 +89,3 @@ subdir('qtest')
subdir('migration-stress')
subdir('functional')
subdir('tracetool')
subdir('xbox')
-4
View File
@@ -1,4 +0,0 @@
all: basic
%: %.a56
a56 -o $@ $<
-12
View File
@@ -1,12 +0,0 @@
P 0000 0C0040
P 0040 0AF080
P 0041 000042
P 0042 56F400
P 0043 123456
P 0044 567000
P 0045 000003
P 0046 08F484
P 0047 000001
P 0048 0C0042
I 000040 start
I 000042 mainloop
-12
View File
@@ -1,12 +0,0 @@
org p:$0000
jmp <start
org p:$40
start
jmp mainloop
mainloop
move #$123456,A
move A,X:3
movep #$000001,x:$ffffc4
jmp <mainloop
-15
View File
@@ -1,15 +0,0 @@
test_env = environment()
test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
exe = executable('test-xbox-mcpx-dsp',
sources: files('test-dsp.c'),
dependencies: [qemuutil, dsp, glib])
test('xbox-mcpx-dsp', exe,
env: test_env,
args: ['--tap', '-k'],
protocol: 'tap',
suite: ['xbox', 'xbox-mcpx', 'xbox-mcpx-dsp'])
alias_target('test-xbox', exe)
-84
View File
@@ -1,84 +0,0 @@
/*
* DSP tests.
*
* Copyright (c) 2025 Matt Borgerson
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "qemu/osdep.h"
#include "hw/xbox/mcpx/apu/dsp/dsp.h"
static void scratch_rw(void *opaque, uint8_t *ptr, uint32_t addr, size_t len, bool dir)
{
assert(!"Not implemented");
}
static void fifo_rw(void *opaque, uint8_t *ptr, unsigned int index, size_t len, bool dir)
{
assert(!"Not implemented");
}
static void load_prog(DSPState *s, const char *path)
{
FILE *file = fopen(path, "r");
assert(file && "Error opening file");
char type, line[100], arg1[20], arg2[20];
int addr, value;
while (fgets(line, sizeof(line), file)) {
if (sscanf(line, "%c %s %s", &type, arg1, arg2) >= 2) {
switch (type) {
case 'P':
case 'X':
case 'Y': {
assert(sscanf(arg1, "%x", &addr) == 1);
assert(sscanf(arg2, "%x", &value) == 1);
dsp_write_memory(s, type, addr, value);
break;
}
}
} else {
printf("Invalid line: %s\n", line);
assert(0);
}
}
fclose(file);
}
static void test_dsp_basic(void)
{
g_autofree gchar *path = g_test_build_filename(G_TEST_DIST, "data", "basic", NULL);
DSPState *s = dsp_init(NULL, scratch_rw, fifo_rw);
load_prog(s, path);
dsp_run(s, 1000);
uint32_t v = dsp_read_memory(s, 'X', 3);
g_assert_cmphex(v, ==, 0x123456);
dsp_destroy(s);
}
int main(int argc, char **argv)
{
g_test_init(&argc, &argv, NULL);
g_test_add_func("/basic", test_dsp_basic);
return g_test_run();
}
-1
View File
@@ -1 +0,0 @@
subdir('dsp')