app-accessibility/at-spi2-atk: re-enable unittests
authorGilles Dartiguelongue <eva@gentoo.org>
Tue, 30 Aug 2016 22:14:45 +0000 (00:14 +0200)
committerGilles Dartiguelongue <eva@gentoo.org>
Tue, 30 Aug 2016 22:15:14 +0000 (00:15 +0200)
Tests were failing due to missing files in upstream tarball, see [1].
Add missing multilib dependency on libxml2 as it is needed to configure.

[1] https://bugzilla.gnome.org/show_bug.cgi?id=770615

Package-Manager: portage-2.3.0

app-accessibility/at-spi2-atk/at-spi2-atk-2.20.1.ebuild
app-accessibility/at-spi2-atk/files/at-spi2-atk-2.20.0-tests-data/test-collection.xml [new file with mode: 0644]
app-accessibility/at-spi2-atk/files/at-spi2-atk-2.20.0-tests-data/test-document.xml [new file with mode: 0644]
app-accessibility/at-spi2-atk/files/at-spi2-atk-2.20.0-tests-data/test-editable-text.xml [new file with mode: 0644]
app-accessibility/at-spi2-atk/files/at-spi2-atk-2.20.0-tests-data/test-hypertext.xml [new file with mode: 0644]
app-accessibility/at-spi2-atk/files/at-spi2-atk-2.20.0-tests-data/test-image.xml [new file with mode: 0644]
app-accessibility/at-spi2-atk/files/at-spi2-atk-2.20.0-tests-data/test-selection.xml [new file with mode: 0644]
app-accessibility/at-spi2-atk/files/at-spi2-atk-2.20.0-tests-data/test-table.xml [new file with mode: 0644]
app-accessibility/at-spi2-atk/files/at-spi2-atk-2.20.0-tests-data/test-text.xml [new file with mode: 0644]
app-accessibility/at-spi2-atk/files/at-spi2-atk-2.20.0-tests-data/test-value.xml [new file with mode: 0644]

index 262acfaf803b43105a2b367e8730e5878b1356fa..e848c4f717db352407a9908a5380c6cd1deca287 100644 (file)
@@ -15,9 +15,6 @@ SLOT="2"
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~x64-macos ~x86-macos"
 IUSE="test"
 
-# tests fail on multilib setups
-RESTRICT="test"
-
 COMMON_DEPEND="
        >=app-accessibility/at-spi2-core-2.17.90[${MULTILIB_USEDEP}]
        >=dev-libs/atk-2.15.4[${MULTILIB_USEDEP}]
@@ -32,13 +29,20 @@ DEPEND="${COMMON_DEPEND}
        test? ( >=dev-libs/libxml2-2.9.1 )
 "
 
+src_prepare() {
+       # Upstream forgot to put this in tarball, upstream #770615
+       cp -n "${FILESDIR}"/${PN}-2.20.0-tests-data/*.xml "${S}"/tests/data/ || die
+
+       gnome2_src_prepare
+}
+
 multilib_src_configure() {
        ECONF_SOURCE=${S} \
        gnome2_src_configure --enable-p2p $(use_with test tests)
 }
 
 multilib_src_test() {
-       dbus-run-session -- emake -j1 check
+       emake check TESTS_ENVIRONMENT="dbus-run-session"
 }
 
 multilib_src_compile() { gnome2_src_compile; }
diff --git a/app-accessibility/at-spi2-atk/files/at-spi2-atk-2.20.0-tests-data/test-collection.xml b/app-accessibility/at-spi2-atk/files/at-spi2-atk-2.20.0-tests-data/test-collection.xml
new file mode 100644 (file)
index 0000000..7086ede
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0" ?>
+<accessible description="Root of the accessible tree" name="root_object" role="accelerator label">
+       <accessible description="first child" name="obj1" role="alert">
+               <state state_enum="modal"/>
+               <state state_enum="multi-line"/>
+       </accessible>
+       <accessible description="second child" name="obj2" role="animation">
+               <accessible description="first prechild" name="obj2/1" role="arrow">
+                       <relation relation_type="2" target_name="obj2"/>
+                       <state state_enum="modal"/>
+                       <state state_enum="multi-line"/>
+               </accessible>
+               <accessible description="second prechild" name="obj2/2" role="canvas"/>
+       </accessible>
+       <accessible description="third child" name="obj3" role="check box">
+               <state state_enum="modal"/>
+               <state state_enum="multi-line"/>
+               <accessible description="first prechild" name="obj3/1" role="check menu item"/>
+       </accessible>
+</accessible>
diff --git a/app-accessibility/at-spi2-atk/files/at-spi2-atk-2.20.0-tests-data/test-document.xml b/app-accessibility/at-spi2-atk/files/at-spi2-atk-2.20.0-tests-data/test-document.xml
new file mode 100644 (file)
index 0000000..7363a62
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" ?>
+<accessible description="Root of the accessible tree" name="root_object" role="accelerator label">
+      <accessible description="first child" name="test" role="alert"/>
+      <accessible_document description="image child" name="my_document" role="text">
+         <document page_numer="7" page_no="2"/>
+      </accessible_document>
+</accessible>
diff --git a/app-accessibility/at-spi2-atk/files/at-spi2-atk-2.20.0-tests-data/test-editable-text.xml b/app-accessibility/at-spi2-atk/files/at-spi2-atk-2.20.0-tests-data/test-editable-text.xml
new file mode 100644 (file)
index 0000000..ae8084c
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" ?>
+<accessible description="Root of the accessible tree" name="root_object" role="accelerator label">
+       <accessible_editable_text description="first child" name="obj0" role="entry">
+               <text_edit_node text="test text"/>
+       </accessible_editable_text>
+       <accessible_editable_text description="second child" name="obj1" role="entry">
+               <text_edit_node text="second test text"/>
+       </accessible_editable_text>
+</accessible>
diff --git a/app-accessibility/at-spi2-atk/files/at-spi2-atk-2.20.0-tests-data/test-hypertext.xml b/app-accessibility/at-spi2-atk/files/at-spi2-atk-2.20.0-tests-data/test-hypertext.xml
new file mode 100644 (file)
index 0000000..1b6be6d
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" ?>
+<accessible description="Root of the accessible tree" name="root_object" role="accelerator label">
+       <accessible_hypertext description="first child" name="obj0" role="alert">
+               <hypertext text="This is article about know downhill portals href='dh-zone.com' href='pinkbike.com'" />
+       </accessible_hypertext>
+</accessible>
diff --git a/app-accessibility/at-spi2-atk/files/at-spi2-atk-2.20.0-tests-data/test-image.xml b/app-accessibility/at-spi2-atk/files/at-spi2-atk-2.20.0-tests-data/test-image.xml
new file mode 100644 (file)
index 0000000..b678ac2
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" ?>
+<accessible description="Root of the accessible tree" name="root_object" role="accelerator label">
+      <accessible description="first child" name="obj1" role="alert"/>
+      <accessible_image description="image child" name="obj0" role="image">
+         <image image_description="image description" width="100" height="50" x="500" y="50" image_extents="png" image_locale="image_locale"/>
+      </accessible_image>
+</accessible>
diff --git a/app-accessibility/at-spi2-atk/files/at-spi2-atk-2.20.0-tests-data/test-selection.xml b/app-accessibility/at-spi2-atk/files/at-spi2-atk-2.20.0-tests-data/test-selection.xml
new file mode 100644 (file)
index 0000000..2fc1733
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" ?>
+<accessible description="Root of the accessible tree" name="root_object" role="accelerator label">
+       <accessible_selection description="first child" name="obj1" role="alert">
+               <accessible description="first prechild" name="obj2/1" role="arrow">
+                       <state state_enum="selected"/>
+               </accessible>
+               <accessible description="second prechild" name="obj2/2" role="canvas" selected="1">
+                       <state state_enum="selected"/>
+               </accessible>
+               <accessible description="first prechild" name="obj2/1" role="arrow"/>
+               <accessible description="second prechild" name="obj2/2" role="canvas"/>
+               <accessible description="first prechild" name="obj3/1" role="check menu item">
+                       <state state_enum="selected"/>
+               </accessible>
+       </accessible_selection>
+</accessible>
diff --git a/app-accessibility/at-spi2-atk/files/at-spi2-atk-2.20.0-tests-data/test-table.xml b/app-accessibility/at-spi2-atk/files/at-spi2-atk-2.20.0-tests-data/test-table.xml
new file mode 100644 (file)
index 0000000..9d6cb50
--- /dev/null
@@ -0,0 +1,70 @@
+<?xml version="1.0" ?>
+<accessible description="Root of the accessible tree" name="root_object" role="accelerator label">
+       <accessible_table description="first_child" name="obj0" role="table">
+               <accessible description="table caption" name="caption name" role="caption"/>
+               <accessible description="table summary" name="table summary name" role="heading"/>
+               <accessible description="first column" name="col1" role="table column header">
+                       <accessible description="first column header" name="column 1 header" role="header"/>
+               </accessible>
+               <accessible description="second column" name="col2" role="table column header">
+                       <state state_enum="selected"/>
+                       <accessible description="second column header" name="column 2 header" role="header"/>
+               </accessible>
+               <accessible description="third column" name="col3" role="table column header">
+                       <accessible description="thrid column header" name="column 3 header" role="header"/>
+               </accessible>
+               <accessible description="first row" name="row1" role="table row header">
+                       <state state_enum="selected"/>
+                       <accessible description="first row header" name="row 1 header" role="header"/>
+               </accessible>
+               <accessible description="second row" name="row2" role="table row header">
+                       <accessible description="second row header" name="row 2 header" role="header"/>
+               </accessible>
+               <accessible description="third row" name="row3" role="table row header">
+                       <state state_enum="selected"/>
+                       <accessible description="third row header" name="row 3 header" role="header"/>
+               </accessible>
+               <accessible description="fourth row" name="row4" role="table row header">
+                       <accessible description="fourth row header" name="row 4 header" role="header"/>
+               </accessible>
+               <accessible_table_cell description="table cell 1" name="cell 0/0" role="table cell">
+                       <table_cell cell_x="0" cell_y="0" row_span="2"/>
+               </accessible_table_cell>
+               <accessible_table_cell description="table cell 5" name="cell 1/0" role="table cell">
+                       <table_cell cell_x="1" cell_y="0" column_span="3"/>
+               </accessible_table_cell>
+               <accessible_table_cell description="table cell 9" name="cell 2/0" role="table cell">
+                       <state state_enum="selected"/>
+                       <table_cell cell_x="2" cell_y="0"/>
+               </accessible_table_cell>
+               <accessible_table_cell description="table cell 2" name="cell 0/1" role="table cell">
+                       <table_cell cell_x="0" cell_y="1"/>
+               </accessible_table_cell>
+               <accessible_table_cell description="table cell 6" name="cell 1/1" role="table cell">
+                       <table_cell cell_x="1" cell_y="1"/>
+               </accessible_table_cell>
+               <accessible_table_cell description="table cell 10" name="cell 2/1" role="table cell">
+                       <table_cell cell_x="2" cell_y="1"/>
+               </accessible_table_cell>
+               <accessible_table_cell description="table cell 3" name="cell 0/2" role="table cell">
+                       <table_cell cell_x="0" cell_y="2"/>
+               </accessible_table_cell>
+               <accessible_table_cell description="table cell 7" name="cell 1/2" role="table cell">
+                       <table_cell cell_x="1" cell_y="2"/>
+               </accessible_table_cell>
+               <accessible_table_cell description="table cell 11" name="cell 2/2" role="table cell">
+                       <table_cell cell_x="2" cell_y="2"/>
+               </accessible_table_cell>
+               <accessible_table_cell description="table cell 4" name="cell 0/3" role="table cell">
+                       <table_cell cell_x="0" cell_y="3"/>
+               </accessible_table_cell>
+               <accessible_table_cell description="table cell 8" name="cell 1/3" role="table cell">
+                       <table_cell cell_x="1" cell_y="3"/>
+               </accessible_table_cell>
+               <accessible_table_cell description="table cell 12" name="cell 2/3" role="table cell">
+                       <table_cell cell_x="2" cell_y="3"/>
+               </accessible_table_cell>
+       </accessible_table>
+</accessible>
+
+
diff --git a/app-accessibility/at-spi2-atk/files/at-spi2-atk-2.20.0-tests-data/test-text.xml b/app-accessibility/at-spi2-atk/files/at-spi2-atk-2.20.0-tests-data/test-text.xml
new file mode 100644 (file)
index 0000000..ab72522
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" ?>
+<accessible description="Root of the accessible tree" name="root_object" role="accelerator label">
+       <accessible_text description="first child" name="obj0" role="text">
+               <text_node text="text0 it works!." x="100" y="33" width="110" height="30" bold_text="on" underline_text="off"/>
+       </accessible_text>
+       <accessible_text description="second child" name="obj1" role="text">
+               <text_node text="First sentence./n Second sentence." x="66" y="44" width="550" height="40" bold_text="off" underline_text="off"/>
+       </accessible_text>
+</accessible>
diff --git a/app-accessibility/at-spi2-atk/files/at-spi2-atk-2.20.0-tests-data/test-value.xml b/app-accessibility/at-spi2-atk/files/at-spi2-atk-2.20.0-tests-data/test-value.xml
new file mode 100644 (file)
index 0000000..83172d5
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" ?>
+<accessible description="Root of the accessible tree" name="root_object" role="accelerator label">
+       <accessible_value description="first child" name="obj0" role="alert">
+               <value_node min="1.1" current="2.1" max="3.1" step="0.1"/>
+       </accessible_value>
+</accessible>