Refactored a handful of things in tests
- Now test errors have correct line reporting! #line directives
are passed to the compiler that reference the relevant line in
the test case shell script.
--- Multi-block directory ---
./tests/test_dirs.sh:109: assert failed with 0, expected 1
lfs_unmount(&lfs) => 1
- Cleaned up the number of implicit global variables provided to
tests. A lot of these were infrequently used and made it difficult
to remember what was provided. This isn't an MCU, so there's very
little cost to stack allocations when needed.
- Minimized the results.py script (previously stats.py) output to
match minimization of test output.
This commit is contained in:
+3
-3
@@ -197,7 +197,7 @@ int lfs_emubd_read(const struct lfs_config *cfg, lfs_block_t block,
|
||||
}
|
||||
}
|
||||
|
||||
emu->stats.read_count += 1;
|
||||
emu->stats.read_count += size;
|
||||
LFS_TRACE("lfs_emubd_read -> %d", 0);
|
||||
return 0;
|
||||
}
|
||||
@@ -270,7 +270,7 @@ int lfs_emubd_prog(const struct lfs_config *cfg, lfs_block_t block,
|
||||
emu->history.blocks[0] = block;
|
||||
}
|
||||
|
||||
emu->stats.prog_count += 1;
|
||||
emu->stats.prog_count += size;
|
||||
LFS_TRACE("lfs_emubd_prog -> %d", 0);
|
||||
return 0;
|
||||
}
|
||||
@@ -317,7 +317,7 @@ int lfs_emubd_erase(const struct lfs_config *cfg, lfs_block_t block) {
|
||||
}
|
||||
}
|
||||
|
||||
emu->stats.erase_count += 1;
|
||||
emu->stats.erase_count += cfg->block_size;
|
||||
LFS_TRACE("lfs_emubd_erase -> %d", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user