aboutsummaryrefslogtreecommitdiffstats
path: root/roms/skiboot/external/pflash/test/tests/06-miscprint
blob: bee84afc5f9439419d914761548fb28ebc0ca9ee (plain)
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
#! /bin/sh
# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later

touch "$DATA_DIR/$CUR_TEST.pnor"

# Don't record the output of ffspart
../ffspart/ffspart -s 0x1000 -c 10 -i "$DATA_DIR/$CUR_TEST.ffs" \
	-p "$DATA_DIR/$CUR_TEST.pnor" 2>&1 >/dev/null
if [ "$?" -ne 0 ] ; then
	fail_test
fi

run_binary "./pflash" "--detail=1 -F $DATA_DIR/$CUR_TEST.pnor"
if [ "$?" -ne 0 ] ; then
	fail_test;
fi
run_binary "./pflash" "--detail=2 -F $DATA_DIR/$CUR_TEST.pnor"
if [ "$?" -ne 0 ] ; then
	fail_test;
fi
run_binary "./pflash" "--detail=3 -F $DATA_DIR/$CUR_TEST.pnor"
if [ "$?" -ne 0 ] ; then
	fail_test;
fi
run_binary "./pflash" "--detail=4 -F $DATA_DIR/$CUR_TEST.pnor"
if [ "$?" -ne 0 ] ; then
	fail_test;
fi
run_binary "./pflash" "--detail=5 -F $DATA_DIR/$CUR_TEST.pnor"
if [ "$?" -ne 0 ] ; then
	fail_test;
fi
run_binary "./pflash" "--detail=6 -F $DATA_DIR/$CUR_TEST.pnor"
if [ "$?" -ne 0 ] ; then
	fail_test;
fi

# The test infrastructure will clean up but lets no chew unnecessarily
# though disk space
rm "$DATA_DIR/$CUR_TEST.pnor"

strip_version_from_result "pflash"

diff_with_result

pass_test