[Pkg-octave-commit] [octave-io] 04/05: Use autopkgtest for running xls(x)/oct/gnumeric reading tests.
Sébastien Villemot
sebastien at debian.org
Sun Nov 6 21:45:44 UTC 2016
This is an automated email from the git hooks/post-receive script.
sebastien pushed a commit to branch master
in repository octave-io.
commit 2e2982dc8c0bed657bae0d48190a1b12562cfe33
Author: Sébastien Villemot <sebastien at debian.org>
Date: Sun Nov 6 22:32:38 2016 +0100
Use autopkgtest for running xls(x)/oct/gnumeric reading tests.
---
debian/check.m | 23 -----------------------
debian/control | 4 +---
debian/source/include-binaries | 8 ++++----
debian/testhelper.m | 32 --------------------------------
debian/tests/control | 2 ++
debian/tests/gnumeric-default | 4 ++++
debian/tests/ods-default | 4 ++++
debian/tests/ods-jod | 4 ++++
debian/tests/ods-oct | 4 ++++
debian/{ => tests}/test.gnumeric | Bin
debian/{ => tests}/test.ods | Bin
debian/{ => tests}/test.xls | Bin
debian/{ => tests}/test.xlsx | Bin
debian/tests/testhelper.m | 20 ++++++++++++++++++++
debian/tests/xls-default | 4 ++++
debian/tests/xls-jxl | 4 ++++
debian/tests/xls-poi | 4 ++++
debian/tests/xlsx-default | 4 ++++
debian/tests/xlsx-oct | 4 ++++
debian/tests/xlsx-poi | 4 ++++
20 files changed, 67 insertions(+), 62 deletions(-)
diff --git a/debian/check.m b/debian/check.m
deleted file mode 100644
index 689a458..0000000
--- a/debian/check.m
+++ /dev/null
@@ -1,23 +0,0 @@
-disp("Testing {xls,ods}read...")
-
-# Do not load libreoffice/UNO stuff (the 3rd arg is omitted), since UNO does
-# not work in a chroot
-chk_spreadsheet_support("/usr/share/java", 0)
-
-# Test defaults
-
-testhelper("xls")
-testhelper("xlsx")
-testhelper("ods")
-testhelper("gnumeric")
-
-# Test specific interfaces (except UNO)
-
-testhelper("xls", "JXL")
-testhelper("xls", "POI")
-
-testhelper("xlsx", "OCT")
-testhelper("xlsx", "POI")
-
-testhelper("ods", "JOD")
-testhelper("ods", "OCT")
diff --git a/debian/control b/debian/control
index f6d0ab9..e30c3df 100644
--- a/debian/control
+++ b/debian/control
@@ -3,9 +3,7 @@ Section: math
Priority: optional
Maintainer: Debian Octave Group <pkg-octave-devel at lists.alioth.debian.org>
Uploaders: Sébastien Villemot <sebastien at debian.org>
-Build-Depends: debhelper (>= 10), cdbs, octave-pkg-dev (>= 1.3.1),
- libjexcelapi-java, libapache-poi-java (>= 3.9-1~),
- unzip, libjopendocument-java
+Build-Depends: debhelper (>= 10), cdbs, octave-pkg-dev (>= 1.3.1)
Standards-Version: 3.9.8
Homepage: http://octave.sourceforge.net/io
Vcs-Git: https://anonscm.debian.org/git/pkg-octave/octave-io.git
diff --git a/debian/source/include-binaries b/debian/source/include-binaries
index 3757696..f266e64 100644
--- a/debian/source/include-binaries
+++ b/debian/source/include-binaries
@@ -1,4 +1,4 @@
-debian/test.gnumeric
-debian/test.xls
-debian/test.xlsx
-debian/test.ods
+debian/tests/test.gnumeric
+debian/tests/test.xls
+debian/tests/test.xlsx
+debian/tests/test.ods
diff --git a/debian/testhelper.m b/debian/testhelper.m
deleted file mode 100644
index cc9d087..0000000
--- a/debian/testhelper.m
+++ /dev/null
@@ -1,32 +0,0 @@
-function testhelper(ext, iface)
- if nargin < 2
- iface = [];
- endif
- fname = [ "debian/test." ext ];
- try
- if strcmp(ext, "xls") || strcmp(ext, "xlsx")
- xlsfinfo(fname, iface);
- d = xlsread(fname);
- else
- odsfinfo(fname, iface);
- d = odsread(fname);
- endif
- assert(size(d) == [ 1001, 2]);
- dispmsg(ext, iface, 1)
- catch
- disp(lasterror.message)
- dispmsg(ext, iface, 0)
- end_try_catch
-endfunction
-
-function dispmsg(ext, iface, success)
- if success
- r = "OK";
- else
- r = "FAIL";
- endif
- if isempty(iface)
- iface = "default interface";
- endif
- printf("\n***\n*** %-45s: %s\n***\n\n", sprintf("Read of %s file with %s", ext, iface), r);
-endfunction
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..cf70bb1
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: xls-default, xls-jxl, xls-poi, xlsx-default, xlsx-oct, xlsx-poi, ods-default, ods-jod, ods-oct, gnumeric-default
+Depends: octave-io, default-jre-headless, libjexcelapi-java, libapache-poi-java, unzip, libjopendocument-java
diff --git a/debian/tests/gnumeric-default b/debian/tests/gnumeric-default
new file mode 100755
index 0000000..5c35bfa
--- /dev/null
+++ b/debian/tests/gnumeric-default
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+echo Testing default interface for gnumeric...
+octave-cli --no-init-file -H -W --path $(pwd)/debian/tests --eval "testhelper gnumeric"
diff --git a/debian/tests/ods-default b/debian/tests/ods-default
new file mode 100755
index 0000000..45cf21f
--- /dev/null
+++ b/debian/tests/ods-default
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+echo Testing default interface for ODS...
+octave-cli --no-init-file -H -W --path $(pwd)/debian/tests --eval "testhelper ods"
diff --git a/debian/tests/ods-jod b/debian/tests/ods-jod
new file mode 100755
index 0000000..6bb685a
--- /dev/null
+++ b/debian/tests/ods-jod
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+echo Testing JOD interface for ODS...
+octave-cli --no-init-file -H -W --path $(pwd)/debian/tests --eval "testhelper ods JOD"
diff --git a/debian/tests/ods-oct b/debian/tests/ods-oct
new file mode 100755
index 0000000..52a1c27
--- /dev/null
+++ b/debian/tests/ods-oct
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+echo Testing OCT interface for ODS...
+octave-cli --no-init-file -H -W --path $(pwd)/debian/tests --eval "testhelper ods OCT"
diff --git a/debian/test.gnumeric b/debian/tests/test.gnumeric
similarity index 100%
rename from debian/test.gnumeric
rename to debian/tests/test.gnumeric
diff --git a/debian/test.ods b/debian/tests/test.ods
similarity index 100%
rename from debian/test.ods
rename to debian/tests/test.ods
diff --git a/debian/test.xls b/debian/tests/test.xls
similarity index 100%
rename from debian/test.xls
rename to debian/tests/test.xls
diff --git a/debian/test.xlsx b/debian/tests/test.xlsx
similarity index 100%
rename from debian/test.xlsx
rename to debian/tests/test.xlsx
diff --git a/debian/tests/testhelper.m b/debian/tests/testhelper.m
new file mode 100644
index 0000000..e078c09
--- /dev/null
+++ b/debian/tests/testhelper.m
@@ -0,0 +1,20 @@
+function testhelper(ext, iface)
+ pkg load io
+
+ ## Do not load libreoffice/UNO stuff (the 3rd arg is omitted), since UNO does
+ ## not work in a chroot
+ chk_spreadsheet_support("/usr/share/java", 0);
+
+ if nargin < 2
+ iface = [];
+ endif
+ fname = [ "debian/tests/test." ext ];
+ if strcmp(ext, "xls") || strcmp(ext, "xlsx")
+ xlsfinfo(fname, iface);
+ d = xlsread(fname);
+ else
+ odsfinfo(fname, iface);
+ d = odsread(fname);
+ endif
+ assert(size(d) == [ 1001, 2]);
+endfunction
diff --git a/debian/tests/xls-default b/debian/tests/xls-default
new file mode 100755
index 0000000..e0f8c42
--- /dev/null
+++ b/debian/tests/xls-default
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+echo Testing default interface for XLS...
+octave-cli --no-init-file -H -W --path $(pwd)/debian/tests --eval "testhelper xls"
diff --git a/debian/tests/xls-jxl b/debian/tests/xls-jxl
new file mode 100755
index 0000000..c208ef9
--- /dev/null
+++ b/debian/tests/xls-jxl
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+echo Testing JXL interface for XLS...
+octave-cli --no-init-file -H -W --path $(pwd)/debian/tests --eval "testhelper xls JXL"
diff --git a/debian/tests/xls-poi b/debian/tests/xls-poi
new file mode 100755
index 0000000..fc6dc5a
--- /dev/null
+++ b/debian/tests/xls-poi
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+echo Testing POI interface for XLS...
+octave-cli --no-init-file -H -W --path $(pwd)/debian/tests --eval "testhelper xls POI"
diff --git a/debian/tests/xlsx-default b/debian/tests/xlsx-default
new file mode 100755
index 0000000..cb6c59f
--- /dev/null
+++ b/debian/tests/xlsx-default
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+echo Testing default interface for XLSX...
+octave-cli --no-init-file -H -W --path $(pwd)/debian/tests --eval "testhelper xlsx"
diff --git a/debian/tests/xlsx-oct b/debian/tests/xlsx-oct
new file mode 100755
index 0000000..bfaec6e
--- /dev/null
+++ b/debian/tests/xlsx-oct
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+echo Testing OCT interface for XLSX...
+octave-cli --no-init-file -H -W --path $(pwd)/debian/tests --eval "testhelper xlsx OCT"
diff --git a/debian/tests/xlsx-poi b/debian/tests/xlsx-poi
new file mode 100755
index 0000000..1fc37d4
--- /dev/null
+++ b/debian/tests/xlsx-poi
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+echo Testing POI interface for XLSX...
+octave-cli --no-init-file -H -W --path $(pwd)/debian/tests --eval "testhelper xlsx POI"
--
Alioth's /home/groups/pkg-octave/bin/git-commit-notice on /srv/git.debian.org/git/pkg-octave/octave-io.git
More information about the Pkg-octave-commit
mailing list