Changeset 1691
- Timestamp:
- 04/26/07 12:24:10
(2 years ago)
- Author:
- dsugar
- Message:
Updated since problem was fixed ticket:135
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1667 |
r1691 |
|
| 1 | 1 | #!/bin/bash |
|---|
| 2 | | |
|---|
| 3 | 2 | DIR=`pwd` |
|---|
| 4 | | #echo Dir $DIR |
|---|
| 5 | 3 | cd ../.. |
|---|
| 6 | 4 | |
|---|
| 7 | 5 | RESULT=0 |
|---|
| 8 | | |
|---|
| 9 | 6 | # LIBSELINUX needs to be passed in as the full path to libselinuxjava.so |
|---|
| 10 | 7 | |
|---|
| … | … | |
| 13 | 10 | |
|---|
| 14 | 11 | #check compiler error result |
|---|
| 15 | | if [ $? -ne 0 ]; then |
|---|
| | 12 | if [ $? -ne 1 ]; then |
|---|
| 16 | 13 | echo Unexpected error during compilation |
|---|
| 17 | 14 | RESULT=1 |
|---|
| 18 | 15 | fi |
|---|
| 19 | 16 | |
|---|
| 20 | | #verify the error output is empty |
|---|
| | 17 | |
|---|
| | 18 | #spaces removed so 'if' doesn't complain |
|---|
| | 19 | EXPECTED_ERROR="Parent'spermissiononresourceiswrappedinthebooleanallow_daemons_use_tty,childpermissionmustalsobewrappedbythesameboolean" |
|---|
| 21 | 20 | if [ -e $DIR/test.err ]; then |
|---|
| 22 | 21 | LINES=`wc -l $DIR/test.err | cut -f 1 -d ' '` |
|---|
| 23 | | if [ $LINES -gt 0 ]; then |
|---|
| 24 | | echo "Unexpected number of lines ($LINES should be 0) in test.err" |
|---|
| | 22 | if [ $LINES -ne 2 ]; then |
|---|
| | 23 | echo "Unexpected number of lines ($LINES should be 2) in test.err" |
|---|
| 25 | 24 | RESULT=1 |
|---|
| 26 | 25 | fi |
|---|
| 27 | | fi |
|---|
| 28 | | |
|---|
| 29 | | # check the expected generated files |
|---|
| 30 | | diff $DIR/test.te $DIR/expected.te >> /dev/null |
|---|
| 31 | | if [ $? -ne 0 ]; then |
|---|
| | 26 | ERROR=`cat -bs $DIR/test.err | grep 1 | cut -d : -f 5 | tr -d ' '` |
|---|
| | 27 | if [ $ERROR != $EXPECTED_ERROR ]; then |
|---|
| | 28 | echo Unexpected error resulted |
|---|
| | 29 | RESULT=1 |
|---|
| | 30 | fi |
|---|
| | 31 | else |
|---|
| | 32 | echo Error output file does not exist |
|---|
| 32 | 33 | RESULT=1 |
|---|
| 33 | | echo Unexpected results from te diff |
|---|
| 34 | | fi |
|---|
| 35 | | diff $DIR/test.if $DIR/expected.if >> /dev/null |
|---|
| 36 | | if [ $? -ne 0 ]; then |
|---|
| 37 | | RESULT=1 |
|---|
| 38 | | echo Unexpected results from if diff |
|---|
| 39 | | fi |
|---|
| 40 | | diff $DIR/test.fc $DIR/expected.fc >> /dev/null |
|---|
| 41 | | if [ $? -ne 0 ]; then |
|---|
| 42 | | RESULT=1 |
|---|
| 43 | | echo Unexpected results from fc diff |
|---|
| 44 | 34 | fi |
|---|
| 45 | 35 | |
|---|
| … | … | |
| 48 | 38 | fi; |
|---|
| 49 | 39 | |
|---|
| | 40 | |
|---|
| 50 | 41 | return $RESULT |
|---|
Download in other formats:
* Generating other formats may take time.