-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
executable file
·62 lines (40 loc) · 1.5 KB
/
run.sh
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
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
# Environment parameter for the debugging of parse that is generated by ocamlyacc
#export OCAMLRUNPARAM='p'
# Turn on the backtrace recording so that the function Printexc.print_backtrace works.
#export OCAMLRUNPARAM='b'
# Unset the debugging parameter
export OCAMLRUNPARAM=''
# Print the command itself set '-x' or disable the printing with '+x'
set +x
TEST_CASE_DIR=./testcases
function test_lst_parser {
echo "Test the *.lst file parser."
./codeparser -m lst $TEST_CASE_DIR/filesystems_proc_show.lst
ret_val=`expr $ret_val + $?`
}
function test_decodeoops_parser {
echo "Test the 'decodecode' output parser."
./codeparser -m asm $TEST_CASE_DIR/filesystems_proc_show.decodeoops 3
#./codeparser -m asm $TEST_CASE_DIR/kmem_cache_alloc.decodeoops -1
ret_val=`expr $ret_val + $?`
}
function test_query {
echo "Test the query function"
./codeparser -m query $TEST_CASE_DIR/filesystems_proc_show.lst 3
./codeparser -m lst $TEST_CASE_DIR/show_map_vma.lst
}
function test_match {
echo "Test the sequence alignment algorithm."
./codeparser -m match $TEST_CASE_DIR/rw_verify_area.lst $TEST_CASE_DIR/rw_verify_area.decodeoops
#echo "########### filesystems_proc_show ############"
#./codeparser -m match $TEST_CASE_DIR/filesystems_proc_show.lst $TEST_CASE_DIR/filesystems_proc_show.decodeoops
}
echo "TEST START:"
ret_val=0
#test_lst_parser
test_decodeoops_parser
#test_query
#test_match
echo "Num of failure cases: $ret_val"
echo "TEST END."