Skip to content

Commit

Permalink
Use a different name for the native compiled file in the testsuite.
Browse files Browse the repository at this point in the history
This allows cheking the generated files afterwards.
  • Loading branch information
dmsc committed Jul 28, 2024
1 parent 4bc2579 commit 68266b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests.mak
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ TESTS_DEPS=\
build/bin/ld65$(HOST_EXT)\
$(COMPILER_COMMON)\

TESTS_XEX=$(TESTS:testsuite/%.chk=build/%.xex)
TESTS_XEX=$(TESTS:testsuite/%.chk=build/%.xex) $(TESTS:testsuite/%.chk=build/%.com)
TESTS_ROM=$(TESTS:testsuite/%.chk=build/%.rom)
TESTS_ASM=$(TESTS:testsuite/%.chk=build/%.asm)
TESTS_OBJ=$(TESTS:testsuite/%.chk=build/%.o)
Expand Down
8 changes: 5 additions & 3 deletions testsuite/src/fbtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -627,8 +627,10 @@ int fbtest(const char *fname)
char *basname = source_fname(base_name, "bas");
// atbname: BASIC file converted to ATASCII
char *atbname = build_fname(tag_name, "atb");
// xexname: XEX file name
// xexname: XEX file name (compiled from the cross-compiler)
char *xexname = build_fname(tag_name, "xex");
// comname: COM file name (compiled from the native compiler)
char *comname = build_fname(tag_name, "com");
// romname: ROM file name
char *romname = build_fname(tag_name, "rom");
// asmname: Assembler file name
Expand All @@ -650,15 +652,15 @@ int fbtest(const char *fname)
if (verbose)
fprintf(stderr, "%s: compile fp native\n", fname);
// Floating Point: native
if (compile_native(atbname, xexname, error_data))
if (compile_native(atbname, comname, error_data))
break;

if (test & test_run)
{
if (verbose)
fprintf(stderr, "%s: run fp native\n", fname);
// Now, runs and checks XEX
if (run_test_xex(xexname, input_buf, expected_out, max_cycles, 0))
if (run_test_xex(comname, input_buf, expected_out, max_cycles, 0))
break;
}
}
Expand Down

0 comments on commit 68266b0

Please sign in to comment.