| 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | # Author: |
| 4 | # Peter Vrabec, <[email protected]> |
| 5 | # Daniel Kopecek <[email protected]> |
| 6 | |
| 7 | |
| 8 | . $builddir/tests/test_common.sh |
| 9 | . $srcdir/test_mitre_common.sh |
| 10 | |
| 11 | # Test Cases. |
| 12 | test_init |
| 13 | |
| 14 | test_run "oval_binary_datatype.xml" test_mitre oval_binary_datatype.xml "true" |
| 15 | test_run "oval_boolean_datatype.xml" test_mitre oval_boolean_datatype.xml "true" |
| 16 | test_run "oval_check_enumeration_entity.xml" test_mitre oval_check_enumeration_entity.xml "true" |
| 17 | test_run "oval_check_enumeration_object_state.xml" test_mitre oval_check_enumeration_object_state.xml "true" |
| 18 | test_run "oval_check_enumeration_variable_values.xml" test_mitre oval_check_enumeration_variable_values.xml "true" |
| 19 | test_run "oval-def_arithmetic_function.xml" test_mitre oval-def_arithmetic_function.xml "true" |
| 20 | test_run "oval-def_begin_function.xml" test_mitre oval-def_begin_function.xml "true" |
| 21 | test_run "oval-def_concat_function.xml" test_mitre oval-def_concat_function.xml "true" |
| 22 | test_run "oval-def_constant_variable.xml" test_mitre oval-def_constant_variable.xml "true" |
| 23 | test_run "oval-def_criteria.xml" test_mitre oval-def_criteria.xml "true" |
| 24 | test_run "oval-def_criterion.xml" test_mitre oval-def_criterion.xml "true" |
| 25 | test_run "oval-def_end_function.xml" test_mitre oval-def_end_function.xml "true" |
| 26 | test_run "oval-def_escape_regex_function.xml" test_mitre oval-def_escape_regex_function.xml "true" |
| 27 | test_run "oval-def_extend_definition.xml" test_mitre oval-def_extend_definition.xml "oval:org.mitre.oval.test:def:117" "true" "oval:org.mitre.oval.test:def:97" "true" |
| 28 | test_run "oval-def_external_variable.xml" test_mitre oval-def_external_variable.xml "true" |
| 29 | test_run "oval-def_literal_component.xml" test_mitre oval-def_literal_component.xml "true" |
| 30 | test_run "oval-def_local_variable.xml" test_mitre oval-def_local_variable.xml "true" |
| 31 | test_run "oval-def_object_component.xml" test_mitre oval-def_object_component.xml "true" |
| 32 | test_run "oval-def_regex_capture_function.xml" test_mitre oval-def_regex_capture_function.xml "true" |
| 33 | # this test fails on filesystems without relatime - directory access time is changed every time |
| 34 | # is readed |
| 35 | if (grep " /tmp " /proc/mounts || grep " / " /proc/mounts) | grep -q relatime; then |
| 36 | test_run "oval-def_set.xml" test_mitre oval-def_set.xml "true" |
| 37 | fi |
| 38 | test_run "oval-def_split_function.xml" test_mitre oval-def_split_function.xml "true" |
| 39 | |
| 40 | # win_filetime format is currently unsupported, there are possibly some wrong values in the document |
| 41 | #test_run "oval-def_time_difference_function.xml" test_mitre oval-def_time_difference_function.xml "true" |
| 42 | |
| 43 | test_run "oval-def_substring_function.xml" test_mitre oval-def_substring_function.xml "true" |
| 44 | test_run "oval-def_variable_component.xml" test_mitre oval-def_variable_component.xml "true" |
| 45 | test_run "oval_evr_string_datatype.xml" test_mitre oval_evr_string_datatype.xml "true" |
| 46 | test_run "oval_existence_enumeration.xml" test_mitre oval_existence_enumeration.xml "true" |
| 47 | test_run "oval_float_datatype.xml" test_mitre oval_float_datatype.xml "true" |
| 48 | test_run "oval_int_datatype.xml" test_mitre oval_int_datatype.xml "true" |
| 49 | test_run "oval_string_datatype.xml" test_mitre oval_string_datatype.xml "true" |
| 50 | test_run "oval_version_datatype.xml" test_mitre oval_version_datatype.xml "true" |
| 51 | |
| 52 | test_exit cleanup_mitre |