summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2010-03-16 21:56:46 +0100
committerMichael Buesch <mb@bu3sch.de>2010-03-16 21:56:46 +0100
commitad3bcf06d7845d1396db00dbd56e9124fd43d4d0 (patch)
tree64ddfdf1ed622b228ec0bc904917d1cb90575e57 /tests
parent8b566cc7158f2149e5f4d23693538a2d5fb34fa8 (diff)
downloadtoprammer-ad3bcf06d7845d1396db00dbd56e9124fd43d4d0.tar.xz
toprammer-ad3bcf06d7845d1396db00dbd56e9124fd43d4d0.zip
w29ee011: Add test
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/run-tests.sh11
-rw-r--r--tests/top2049/003-w29ee011dip32.test18
2 files changed, 25 insertions, 4 deletions
diff --git a/tests/run-tests.sh b/tests/run-tests.sh
index 6742e48..bee9a36 100755
--- a/tests/run-tests.sh
+++ b/tests/run-tests.sh
@@ -140,16 +140,19 @@ testfile_2k="$tmpdir/testfile_2k"
create_random_file "$testfile_2k" 1024 2
testfile_4k="$tmpdir/testfile_4k"
-create_random_file "$testfile_4k" 1024 4
+create_random_file "$testfile_4k" 4096 1
testfile_8k="$tmpdir/testfile_8k"
-create_random_file "$testfile_8k" 1024 8
+create_random_file "$testfile_8k" 4096 2
testfile_16k="$tmpdir/testfile_16k"
-create_random_file "$testfile_16k" 1024 16
+create_random_file "$testfile_16k" 4096 4
testfile_32k="$tmpdir/testfile_32k"
-create_random_file "$testfile_32k" 1024 32
+create_random_file "$testfile_32k" 4096 8
+
+testfile_128k="$tmpdir/testfile_128k"
+create_random_file "$testfile_128k" 4096 32
for device in $(ls "$basedir"); do
diff --git a/tests/top2049/003-w29ee011dip32.test b/tests/top2049/003-w29ee011dip32.test
new file mode 100644
index 0000000..676dd34
--- /dev/null
+++ b/tests/top2049/003-w29ee011dip32.test
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+function test_init
+{
+ request_DUT "w29ee011dip32" || return 1
+ return 0
+}
+
+function test_run
+{
+ local args="--bitfile w29ee011dip32 -I bin -O bin"
+
+ toprammer $args --erase
+
+ toprammer $args --write-eeprom "$testfile_128k"
+ toprammer $args --read-eeprom "$tmpfile"
+ compare_files "$testfile_128k" "$tmpfile" || die "EEPROM mismatch"
+}
bues.ch cgit interface