added xsd folder in the package and modified test_definition.xsd file
authorNicolas Zingilé <nicolas.zingile@open.eurogiciel.org>
Fri, 4 Jul 2014 09:59:02 +0000 (11:59 +0200)
committerNicolas Zingilé <nicolas.zingile@open.eurogiciel.org>
Thu, 18 Sep 2014 10:56:29 +0000 (12:56 +0200)
Change-Id: I277e3c5a3585be4b4558347545ad55677804a6e8
Signed-off-by: Nicolas Zingilé <nicolas.zingile@open.eurogiciel.org>
packaging/testkit-lite.spec
xsd/test_definition.xsd

index ac2e54a..1b75f59 100644 (file)
@@ -56,6 +56,8 @@ sed -i '/^#!/d' ./testkitlite/util/str2.py
 
 %install
 python setup.py install --prefix=%{_prefix} --root=%{buildroot}
+install -d %{buildroot}/%{_datadir}/%{name}
+cp -r xsd %{buildroot}/%{_datadir}/%{name}
 %fdupes %{buildroot}
 pushd %{buildroot}%{python_sitelib}
 %py_compile .
@@ -74,5 +76,6 @@ popd
 /opt/testkit/lite/test_definition_schema.pdf
 %{python_sitelib}/testkitlite/*
 %{python_sitelib}/testkit_lite-%{version}-py%{py_ver}.egg-info/*
+%{_datadir}/%{name}
 /opt/testkit/lite/VERSION
 /opt/testkit/lite/commodule/CONFIG
index f47b778..9a11cd4 100644 (file)
         </xs:restriction>
       </xs:simpleType>
     </xs:attribute>
+    <!-- added to enable name attribute in a testcase element -->
+    <xs:attribute name="name">
+      <xs:simpleType>
+        <xs:restriction base="xs:string">
+          <xs:minLength value="1"/>
+          <xs:whiteSpace value="collapse"/>
+        </xs:restriction>
+      </xs:simpleType>
+    </xs:attribute>
+    <!-- end of addition -->
     <xs:attribute name="priority" type="priority_simple_type" use="required"/>
     <xs:attribute name="execution_type" type="execution_type_simple_type" use="required"/>
     <xs:attribute name="component" type="xs:string"/>
         <xs:choice minOccurs="0" maxOccurs="1">
           <xs:element ref="post_condition"/>
         </xs:choice>
-        <xs:element ref="steps" minOccurs="1" maxOccurs="1"/>
+       <!-- do not force to have at least a steps element -->
+        <xs:element ref="steps" minOccurs="0" maxOccurs="1"/>
         <xs:choice minOccurs="0" maxOccurs="1">
           <xs:element ref="test_script_entry"/>
         </xs:choice>