File: 000_source-validation

package info (click to toggle)
daps 3.0.0-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 16,060 kB
  • sloc: xml: 14,348; sh: 5,654; perl: 409; lisp: 380; python: 260; makefile: 254; sed: 8
file content (37 lines) | stat: -rwxr-xr-x 819 bytes parent folder | download
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
#!/bin/bash
#
# Copyright (C) 2012-2015 SUSE Linux GmbH
#
# Author:
# Frank Sundermeyer <fsundermeyer at opensuse dot org>
#
# Testing DAPS: source-validation
#
# * Are the XML sources of the test document well formed ?
#

source lib/common_functions

header "Document Source Validation"

function oneTimeTearDown() {
    stats
}

#---------------------------------------------------------------
# TESTS
#---------------------------------------------------------------

test_validSources () {
    local _MAIN_FILE
    for _MAIN_FILE in "$_MAINPATH" "$_MAINPATH_NOPROF"; do
	xmllint --nonet --noout --nowarning --xinclude --loaddtd $_MAIN_FILE 2>&1
	assertTrue \
            " └─ XML sources for MAIN=$(basename $_MAIN_FILE) do not validate" \
            "$?"
    done
}


# source shUnit2 test
source $_SHUNIT2SRC