File: flash.test

package info (click to toggle)
genimage 19-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 988 kB
  • sloc: ansic: 5,606; sh: 1,132; makefile: 194
file content (48 lines) | stat: -rwxr-xr-x 1,095 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
test_description="Flash Image Tests"

. "$(dirname "${0}")/test-setup.sh"

exec_test_set_prereq dd
test_expect_success dd "flash" "
	setup_test_images &&
	run_genimage flash.config test.flash &&
	check_size 'images/test.flash' 2097152 &&
	md5sum -c '${testdir}/flash.md5'
"

test_expect_success dd "flash-fill" "
	setup_test_images &&
	run_genimage flash-fill.config test.flash &&
	check_size 'images/test.flash' 3145728 &&
	md5sum  -c '${testdir}/flash-fill.md5'
"

exec_test_set_prereq mkfs.jffs2
test_expect_success mkfs_jffs2 "jffs2" "
	run_genimage_root jffs2.config test.jffs2 &&
	md5sum -c '${testdir}/jffs2.md5'
"

exec_test_set_prereq mkfs.ubifs
test_expect_success mkfs_ubifs "ubifs" "
	run_genimage_root ubifs.config test.ubifs &&
	check_size_range images/test.ubifs 200000 300000
"

setup_ubi_images() {
	rm -rf input &&
	mkdir input &&
	cp images/test.ubifs input/
}

exec_test_set_prereq ubinize
test_expect_success ubinize "ubi" "
	setup_ubi_images &&
	run_genimage ubi.config test.ubi &&
	check_size_range images/test.ubi 550000 600000
"

test_done

# vim: syntax=sh