Minor improvements to testing framework

- Moved scripts into scripts folder
- Removed what have been relatively unhelpful assert printing
This commit is contained in:
Christopher Haster
2019-07-16 20:53:39 -05:00
parent 52a90b8dcc
commit 1aaf1cb6c0
19 changed files with 174 additions and 180 deletions

View File

@@ -7,12 +7,12 @@ LARGESIZE=262144
echo "=== File tests ==="
rm -rf blocks
tests/test.py << TEST
scripts/test.py << TEST
lfs_format(&lfs, &cfg) => 0;
TEST
echo "--- Simple file test ---"
tests/test.py << TEST
scripts/test.py << TEST
lfs_mount(&lfs, &cfg) => 0;
lfs_file_open(&lfs, &file[0], "hello", LFS_O_WRONLY | LFS_O_CREAT) => 0;
size = strlen("Hello World!\n");
@@ -29,7 +29,7 @@ tests/test.py << TEST
TEST
w_test() {
tests/test.py ${4:-} << TEST
scripts/test.py ${4:-} << TEST
size = $1;
lfs_size_t chunk = 31;
srand(0);
@@ -49,7 +49,7 @@ TEST
}
r_test() {
tests/test.py << TEST
scripts/test.py << TEST
size = $1;
lfs_size_t chunk = 29;
srand(0);
@@ -105,7 +105,7 @@ r_test $LARGESIZE largeavacado
r_test 0 noavacado
echo "--- Dir check ---"
tests/test.py << TEST
scripts/test.py << TEST
lfs_mount(&lfs, &cfg) => 0;
lfs_dir_open(&lfs, &dir[0], "/") => 0;
lfs_dir_read(&lfs, &dir[0], &info) => 1;
@@ -136,10 +136,10 @@ tests/test.py << TEST
TEST
echo "--- Many file test ---"
tests/test.py << TEST
scripts/test.py << TEST
lfs_format(&lfs, &cfg) => 0;
TEST
tests/test.py << TEST
scripts/test.py << TEST
// Create 300 files of 6 bytes
lfs_mount(&lfs, &cfg) => 0;
lfs_mkdir(&lfs, "directory") => 0;
@@ -155,4 +155,4 @@ tests/test.py << TEST
TEST
echo "--- Results ---"
tests/stats.py
scripts/stats.py