Misc test suite improvements

This commit is contained in:
Aaron Culliney 2016-09-11 11:50:41 -07:00
parent b37c94f404
commit 07e1c4ed83
2 changed files with 13 additions and 9 deletions

View File

@ -61,13 +61,10 @@ void test_common_init(void) {
prefs_save();
c_debugger_set_watchpoint(WATCHPOINT_ADDR);
if (0) {
c_debugger_set_timeout(15);
} else {
fprintf(stderr, "NOTE : RUNNING WITH DISPLAY\n");
fprintf(stderr, "Will spinloop on failed tests for debugger intervention\n");
c_debugger_set_timeout(0);
}
fprintf(stderr, "NOTE : RUNNING WITH DISPLAY\n");
fprintf(stderr, "Will spinloop on failed tests for debugger intervention\n");
c_debugger_set_timeout(0);
}
int test_setup_boot_disk(const char *fileName, int readonly) {
@ -97,7 +94,6 @@ int test_setup_boot_disk(const char *fileName, int readonly) {
# endif
do {
const char **fmtPtr = &fmts[0];
unsigned int idx = 0;
while (*fmtPtr) {
@ -132,7 +128,7 @@ int test_setup_boot_disk(const char *fileName, int readonly) {
// AppDelegate should have copied disks to a R/W location
fileURL = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, fileString, kCFURLPOSIXPathStyle, /*isDirectory*/false);
# endif
}
}
}
if (fileURL) {

View File

@ -60,6 +60,14 @@ static inline int ASSERT_SHA_MEM(const char *SHA_STR, uint16_t ea, uint16_t len)
return 0;
}
static inline int ASSERT_SHA_BIN(const char *SHA_STR, const uint8_t * const buf, unsigned long len) {
uint8_t md[SHA_DIGEST_LENGTH];
SHA1(buf, len, md);
sha1_to_str(md, mdstr);
ASSERT(strcasecmp(mdstr, SHA_STR) == 0);
return 0;
}
static inline int BOOT_TO_DOS(void) {
if (test_do_reboot) {
ASSERT(apple_ii_64k[0][WATCHPOINT_ADDR] != TEST_FINISHED);