mirror of
https://github.com/antonblanchard/microwatt.git
synced 2026-01-11 23:43:15 +00:00
test: Add test for metavalues
Make sure they don't increase in future Signed-off-by: Michael Neuling <mikey@neuling.org>
This commit is contained in:
parent
72fcca8e52
commit
eeac86c9d8
@ -23,7 +23,15 @@ cd $TMPDIR
|
||||
|
||||
cp ${MICROWATT_DIR}/tests/${TEST}.bin main_ram.bin
|
||||
|
||||
${MICROWATT_DIR}/core_tb > /dev/null 2> test1.out || true
|
||||
${MICROWATT_DIR}/core_tb > console.out 2> test1.out || true
|
||||
|
||||
# check metavalues aren't increasing
|
||||
COUNT=$(grep -c 'metavalue' console.out)
|
||||
EXP=$(cat ${MICROWATT_DIR}/tests/${TEST}.metavalue)
|
||||
if [[ $COUNT -gt $EXP ]] ; then
|
||||
echo "$TEST FAIL ******** metavalues increased from $EXP to $COUNT"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
grep -v "Failed to bind debug socket" test1.out > test.out
|
||||
|
||||
@ -31,5 +39,5 @@ cp ${MICROWATT_DIR}/tests/${TEST}.console_out exp.out
|
||||
|
||||
diff -q test.out exp.out && echo "$TEST PASS" && exit 0
|
||||
|
||||
echo "$TEST FAIL ********"
|
||||
echo "$TEST FAIL ******** Console output changed"
|
||||
exit 1
|
||||
|
||||
1
tests/test_decrementer.metavalue
Normal file
1
tests/test_decrementer.metavalue
Normal file
@ -0,0 +1 @@
|
||||
118
|
||||
1
tests/test_fpu.metavalue
Normal file
1
tests/test_fpu.metavalue
Normal file
@ -0,0 +1 @@
|
||||
118
|
||||
1
tests/test_illegal.metavalue
Normal file
1
tests/test_illegal.metavalue
Normal file
@ -0,0 +1 @@
|
||||
118
|
||||
1
tests/test_misc.metavalue
Normal file
1
tests/test_misc.metavalue
Normal file
@ -0,0 +1 @@
|
||||
118
|
||||
1
tests/test_mmu.metavalue
Normal file
1
tests/test_mmu.metavalue
Normal file
@ -0,0 +1 @@
|
||||
144
|
||||
1
tests/test_modes.metavalue
Normal file
1
tests/test_modes.metavalue
Normal file
@ -0,0 +1 @@
|
||||
152
|
||||
1
tests/test_pmu.metavalue
Normal file
1
tests/test_pmu.metavalue
Normal file
@ -0,0 +1 @@
|
||||
118
|
||||
1
tests/test_privileged.metavalue
Normal file
1
tests/test_privileged.metavalue
Normal file
@ -0,0 +1 @@
|
||||
152
|
||||
1
tests/test_reservation.metavalue
Normal file
1
tests/test_reservation.metavalue
Normal file
@ -0,0 +1 @@
|
||||
118
|
||||
1
tests/test_sc.metavalue
Normal file
1
tests/test_sc.metavalue
Normal file
@ -0,0 +1 @@
|
||||
118
|
||||
1
tests/test_spr_read.metavalue
Normal file
1
tests/test_spr_read.metavalue
Normal file
@ -0,0 +1 @@
|
||||
118
|
||||
1
tests/test_trace.metavalue
Normal file
1
tests/test_trace.metavalue
Normal file
@ -0,0 +1 @@
|
||||
118
|
||||
1
tests/test_xics.metavalue
Normal file
1
tests/test_xics.metavalue
Normal file
@ -0,0 +1 @@
|
||||
118
|
||||
@ -9,6 +9,7 @@ for i in sc illegal decrementer xics privileged mmu misc modes pmu reservation t
|
||||
cd -
|
||||
cp $i/$i.bin test_$i.bin
|
||||
ln -s test_$i.bin main_ram.bin
|
||||
../core_tb > /dev/null 2> test_$i.console_out
|
||||
rm main_ram.bin
|
||||
../core_tb > test_$i.log_out 2> test_$i.console_out
|
||||
grep -c metavalue test_$i.log_out > test_$i.metavalue
|
||||
rm main_ram.bin test_$i.log_out
|
||||
done
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user