Merge pull request #636 from uclouvain/opj_malloc-625
authorMatthieu Darbois <mayeut@users.noreply.github.com>
Sun, 18 Oct 2015 01:14:55 +0000 (03:14 +0200)
committerMatthieu Darbois <mayeut@users.noreply.github.com>
Sun, 18 Oct 2015 01:14:55 +0000 (03:14 +0200)
Update allocation functions
Fix #625
Fix #624
Fix #635

17 files changed:
.travis.yml
README.md
appveyor.yml [new file with mode: 0644]
src/bin/common/color.c
src/lib/openjp2/dwt.c
src/lib/openjp2/opj_clock.c
src/lib/openjp3d/jp3d.c
src/lib/openjpwl/jpwl.c
tools/abi-tracker/openjpeg.json [new file with mode: 0644]
tools/ctest_scripts/travis-ci.cmake
tools/travis-ci/abi-check.sh [new file with mode: 0755]
tools/travis-ci/install.sh
tools/travis-ci/knownfailures-Ubuntu12.04-gcc4.6.4-i386-Release-3rdP.txt [new file with mode: 0644]
tools/travis-ci/knownfailures-windows-vs2010-x86-Release-3rdP.txt [new file with mode: 0644]
tools/travis-ci/knownfailures-windows-vs2015-x64-Release-3rdP.txt [new file with mode: 0644]
tools/travis-ci/knownfailures-windows-vs2015-x86-Release-3rdP.txt [new file with mode: 0644]
tools/travis-ci/run.sh

index e5872a31ec3a86711ca86bea6addcb586fe2558d..07dedbc44a6b093e3327aaf75ac713212f25762c 100644 (file)
@@ -1,52 +1,63 @@
 language: c
-os:
-  - linux
-  - osx
-compiler:
-  - gcc
-  - clang
-  - x86_64-w64-mingw32-gcc
-env:
-  - OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Release
-  - OPJ_CI_ARCH=i386 OPJ_CI_BUILD_CONFIGURATION=Release
-  - OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Debug OPJ_CI_ASAN=1
-  - OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Debug
-  
+
 matrix:
-  exclude:
+  include:
     - os: osx
+      compiler: clang
+      env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Release
+    - os: linux
+      compiler: gcc
+      env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Release
+    - os: linux
       compiler: gcc
-    - os: osx
-      compiler: x86_64-w64-mingw32-gcc
-    - compiler: clang
       env: OPJ_CI_ARCH=i386 OPJ_CI_BUILD_CONFIGURATION=Release
-    - compiler: clang
+      addons:
+        apt:
+          packages:
+            - gcc-multilib
+    - os: linux
+      compiler: gcc
       env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Debug
     - os: linux
       compiler: clang
-      env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Release
-    - compiler: gcc
       env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Debug OPJ_CI_ASAN=1
-    - compiler: x86_64-w64-mingw32-gcc
-      env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Debug OPJ_CI_ASAN=1
-    - compiler: x86_64-w64-mingw32-gcc
-      env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Debug
-    - os: osx
-      env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Debug OPJ_CI_ASAN=1
-  
-addons:
-  apt:
-    packages:
-      - gcc-multilib
-      - gcc-mingw-w64-base
-      - binutils-mingw-w64-i686
-      - binutils-mingw-w64-x86-64
-      - gcc-mingw-w64-i686
-      - gcc-mingw-w64-x86-64
-      - gcc-mingw-w64
+    - os: linux
+      compiler: x86_64-w64-mingw32-gcc
+      env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Release
+      addons:
+        apt:
+          packages:
+            - gcc-mingw-w64-base
+            - binutils-mingw-w64-x86-64
+            - gcc-mingw-w64-x86-64
+            - gcc-mingw-w64
+    - os: linux
+      compiler: x86_64-w64-mingw32-gcc
+      env: OPJ_CI_ARCH=i386 OPJ_CI_BUILD_CONFIGURATION=Release
+      addons:
+        apt:
+          packages:
+            - gcc-mingw-w64-base
+            - binutils-mingw-w64-i686
+            - gcc-mingw-w64-i686
+            - gcc-mingw-w64      
+    - os: linux
+      compiler: gcc-4.8
+      env: OPJ_CI_ABI_CHECK=1
+      addons:
+        apt:
+          sources:
+            - ubuntu-toolchain-r-test
+          packages:
+            - gcc-4.8
+            - libelf-dev
+            - elfutils
+            - texinfo
+            - exuberant-ctags
 
 install:
   - ./tools/travis-ci/install.sh
 
 script:
   - ./tools/travis-ci/run.sh
+  - ./tools/travis-ci/abi-check.sh
index 17b8957b7913bb5edbe5f29650c9e51eca4ffe86..c40f19e5ef460b746260daad2e3286ff4c4c1721 100644 (file)
--- a/README.md
+++ b/README.md
@@ -6,17 +6,20 @@
 OpenJPEG is an open-source JPEG 2000 codec written in C language. It has been developed in order to promote the use of [JPEG 2000](http://www.jpeg.org/jpeg2000), a still-image compression standard from the Joint Photographic Experts Group ([JPEG](http://www.jpeg.org)).  Since April 2015, it is officially recognized by ISO/IEC and ITU-T as a [JPEG 2000 Reference Software](http://www.itu.int/rec/T-REC-T.804-201504-I!Amd2).
 
 ## Who can use the code ?
+[![badge-license]][link-license]
 
-Anyone. As the OpenJPEG code is released under the [2-clauses BSD license](https://github.com/uclouvain/openjpeg/blob/master/LICENSE), anyone can use or modify the code, even for commercial applications. The only restriction is to retain the copyright in the sources or in the binaries documentation. Of course, if you modified the code in a way that might be of interest for other users, you are encouraged to share it (through a [github pull request](https://github.com/uclouvain/openjpeg/pulls) or by filling an [issue](https://github.com/uclouvain/openjpeg/issues)) but this is not a requirement.
+Anyone. As the OpenJPEG code is released under the [BSD 2-clause "Simplified" License][link-license], anyone can use or modify the code, even for commercial applications. The only restriction is to retain the copyright in the sources or in the binaries documentation. Of course, if you modified the code in a way that might be of interest for other users, you are encouraged to share it (through a [github pull request](https://github.com/uclouvain/openjpeg/pulls) or by filling an [issue](https://github.com/uclouvain/openjpeg/issues)) but this is not a requirement.
 
 ## How to install and use OpenJPEG ?
 API Documentation needs a major refactoring. Meanwhile, you can check [installation](https://github.com/uclouvain/openjpeg/wiki/Installation) instructions and [codec documentation](https://github.com/uclouvain/openjpeg/wiki/DocJ2KCodec).
     
 ## Current Status
-[![Build Status](https://travis-ci.org/uclouvain/openjpeg.svg?branch=master)](https://travis-ci.org/uclouvain/openjpeg)
+[![badge-build]][link-build]
+
+[![badge-msvc-build]][link-msvc-build] 
+
+[![badge-coverity]][link-coverity]
 
-[![Coverity Scan Build Status](https://scan.coverity.com/projects/6383/badge.svg)](https://scan.coverity.com/projects/uclouvain-openjpeg)
-    
 ## Who are the developers ?
 
 The library is developed and maintained by the Image and Signal Processing Group ([ISPGroup](http://sites.uclouvain.be/ispgroup/)), in the Université catholique de Louvain ([UCL](http://www.uclouvain.be/en-index.html), with the support of the [CNES](https://cnes.fr/), the [CS](http://www.c-s.fr/) company and the [intoPIX](http://www.intopix.com) company. The JPWL module has been developed by the Digital Signal Processing Lab ([DSPLab](http://dsplab.diei.unipg.it/)) of the University of Perugia, Italy ([UNIPG](http://www.unipg.it/)).
@@ -47,7 +50,7 @@ The library is developed and maintained by the Image and Signal Processing Group
 * tests: configuration files and utilities for the openjpeg test suite. All test images are located in [openjpeg-data](https://github.com/uclouvain/openjpeg-data) repository.
 * cmake: cmake related files
 
-See [LICENSE](https://github.com/uclouvain/openjpeg/blob/master/LICENSE) for license and copyright information.
+See [LICENSE][link-license] for license and copyright information.
 
 See [INSTALL](https://github.com/uclouvain/openjpeg/blob/master/INSTALL) for installation procedures.
 
@@ -59,8 +62,18 @@ OpenJPEG strives to provide a stable API/ABI for your applications. As such it
 only exposes a limited subset of its functions.  It uses a mechanism of
 exporting/hiding functions. If you are unsure which functions you can use in
 your applications, you should compile OpenJPEG using something similar to gcc:
-`fvisibility=hidden` compilation flag.
+`-fvisibility=hidden` compilation flag.
 See also: http://gcc.gnu.org/wiki/Visibility
 
 On windows, MSVC directly supports export/hiding function and as such the only
 API available is the one supported by OpenJPEG.
+
+[comment-license]: https://img.shields.io/github/license/uclouvain/openjpeg.svg "https://img.shields.io/badge/license-BSD--2--Clause-blue.svg"
+[badge-license]: https://img.shields.io/badge/license-BSD--2--Clause-blue.svg "BSD 2-clause "Simplified" License"
+[link-license]: https://github.com/uclouvain/openjpeg/blob/master/LICENSE "BSD 2-clause "Simplified" License"
+[badge-build]: https://travis-ci.org/uclouvain/openjpeg.svg?branch=master "Build Status"
+[link-build]: https://travis-ci.org/uclouvain/openjpeg "Build Status"
+[badge-msvc-build]: https://ci.appveyor.com/api/projects/status/github/uclouvain/openjpeg?branch=master&svg=true "Windows Build Status"
+[link-msvc-build]: https://ci.appveyor.com/project/detonin/openjpeg/branch/master "Windows Build Status"
+[badge-coverity]: https://scan.coverity.com/projects/6383/badge.svg "Coverity Scan Build Status"
+[link-coverity]: https://scan.coverity.com/projects/uclouvain-openjpeg "Coverity Scan Build Status"
diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644 (file)
index 0000000..d5cc162
--- /dev/null
@@ -0,0 +1,23 @@
+version: 2.1.1.{build}
+branches:
+  except:
+  - coverity_scan
+skip_tags: true
+clone_depth: 50
+environment:
+  matrix:
+  - OPJ_CI_ARCH: x86
+    OPJ_CI_VSCOMNTOOLS: $(VS140COMNTOOLS)
+  - OPJ_CI_ARCH: x64
+    OPJ_CI_VSCOMNTOOLS: $(VS140COMNTOOLS)
+  - OPJ_CI_ARCH: x86
+    OPJ_CI_VSCOMNTOOLS: $(VS100COMNTOOLS)
+install:
+- cmd: c:\cygwin\bin\bash ./tools/travis-ci/install.sh
+build_script:
+- cmd: >-
+    "%OPJ_CI_VSCOMNTOOLS%..\..\VC\vcvarsall.bat" %OPJ_CI_ARCH%
+
+    bash ./tools/travis-ci/run.sh
+test: off
+deploy: off
index 3b0eb97bab5d4051e72bb5dc74e185c30d28d927..0f2b8daca74e4deeb9c7f75fa137a20ebc726e71 100644 (file)
@@ -617,7 +617,7 @@ void color_cielab_to_rgb(opj_image_t *image)
                
                default_type = (unsigned int)row[1];
                
-               if(default_type == 0x44454600)// DEF : default
+               if(default_type == 0x44454600)/* DEF : default */
                {
                        rl = 100; ra = 170; rb = 200;
                        ol = 0;
@@ -679,9 +679,9 @@ void color_cielab_to_rgb(opj_image_t *image)
        }
        
        fprintf(stderr,"%s:%d:\n\tenumCS %d not handled. Ignoring.\n", __FILE__,__LINE__, enumcs);
-}// color_apply_conversion()
+}/* color_apply_conversion() */
 
-#endif // OPJ_HAVE_LIBLCMS2 || OPJ_HAVE_LIBLCMS1
+#endif /* OPJ_HAVE_LIBLCMS2 || OPJ_HAVE_LIBLCMS1 */
 
 void color_cmyk_to_rgb(opj_image_t *image)
 {
@@ -732,11 +732,11 @@ void color_cmyk_to_rgb(opj_image_t *image)
                memcpy(&(image->comps[i]), &(image->comps[i+1]), sizeof(image->comps[i]));
        }
 
-}// color_cmyk_to_rgb()
+}/* color_cmyk_to_rgb() */
 
-//
-// This code has been adopted from sjpx_openjpeg.c of ghostscript
-//
+/*
+ * This code has been adopted from sjpx_openjpeg.c of ghostscript
+ */
 void color_esycc_to_rgb(opj_image_t *image)
 {
        int y, cb, cr, sign1, sign2, val;
@@ -785,4 +785,4 @@ void color_esycc_to_rgb(opj_image_t *image)
        }
        image->color_space = OPJ_CLRSPC_SRGB;
 
-}// color_esycc_to_rgb()
+}/* color_esycc_to_rgb() */
index 41dca2fe7e4c30730840c141605dbc00de9b473f..92752f4289821352dd624ca46d3bb76a27420df2 100644 (file)
@@ -743,8 +743,8 @@ static void opj_v4dwt_decode_step1(opj_v4_t* w, OPJ_INT32 count, const OPJ_FLOAT
 
 static void opj_v4dwt_decode_step2(opj_v4_t* l, opj_v4_t* w, OPJ_INT32 k, OPJ_INT32 m, OPJ_FLOAT32 c)
 {
-       OPJ_FLOAT32* restrict fl = (OPJ_FLOAT32*) l;
-       OPJ_FLOAT32* restrict fw = (OPJ_FLOAT32*) w;
+       OPJ_FLOAT32* fl = (OPJ_FLOAT32*) l;
+       OPJ_FLOAT32* fw = (OPJ_FLOAT32*) w;
        OPJ_INT32 i;
        for(i = 0; i < m; ++i){
                OPJ_FLOAT32 tmp1_1 = fl[0];
index 0df99ef04defd84f5b442a074c42f4794e67c3fb..bb4cae734ad075705fee65bd8769bb51e282804c 100644 (file)
@@ -29,6 +29,8 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "opj_includes.h"
+
 #ifdef _WIN32
 #include <windows.h>
 #else
@@ -36,7 +38,6 @@
 #include <sys/resource.h>
 #include <sys/times.h>
 #endif /* _WIN32 */
-#include "opj_includes.h"
 
 OPJ_FLOAT64 opj_clock(void) {
 #ifdef _WIN32
index f445fb36d9a81d58aef649a48adff451af622799..9e060df741ae35e1e04a6e23d55fbce8ca17f2d2 100644 (file)
@@ -1008,6 +1008,7 @@ static void j3d_write_qcx(opj_j3d_t *j3d, int compno) {
        
        cio_write(cio, tccp->qntsty + (tccp->numgbits << 5), 1);        /* Sqcx : Table A28 de 15444-1*/
        
+       numbands = 0; // compiler warning
        if (j3d->cinfo->codec_format == CODEC_J2K)
         numbands = tccp->qntsty == J3D_CCP_QNTSTY_SIQNT ? 1 : tccp->numresolution[0] * 3 - 2; 
        else if (j3d->cinfo->codec_format == CODEC_J3D) {
index 79d0e04c607497e40f4b66bf9da85697ed6a3250..99a34990fbd3759caf6e4cdfc9e4ed07325bc53a 100644 (file)
@@ -1296,7 +1296,7 @@ opj_bool jpwl_check_tile(opj_j2k_t *j2k, opj_tcd_t *tcd, int tileno) {
                                                         opj_event_msg(j2k->cinfo, JPWL_ASSUME ? EVT_WARNING : EVT_ERROR,
                                                                 "JPWL: wrong x-cord of block origin %d => x-prec is (%d, %d)\n",
                                                                 block->x0, prec->x0, prec->x1);
-                                                        if (!JPWL_ASSUME || JPWL_ASSUME)
+                                                        if (!JPWL_ASSUME)
                                                                 return OPJ_FALSE;
                                                 };
                                         }
diff --git a/tools/abi-tracker/openjpeg.json b/tools/abi-tracker/openjpeg.json
new file mode 100644 (file)
index 0000000..2cfa443
--- /dev/null
@@ -0,0 +1,132 @@
+{
+  "Name":           "openjpeg",
+  "Title":          "OpenJPEG",
+  "SourceUrl":      "https://github.com/uclouvain/openjpeg/tags",
+  "Git":            "https://github.com/uclouvain/openjpeg.git",
+  "Maintainer":     "Antonin D.",
+  "MaintainerUrl":  "http://www.openjpeg.org/",
+  "Package":        "version.",
+  "Configure":      "-DCMAKE_C_FLAGS='-fvisibility=hidden -g -Og -w -fpermissive'",
+
+  "Versions": [
+  {
+    "Number":         "current",
+    "Installed":      "installed/openjpeg/current",
+    "Source":         "src/openjpeg/current",
+    "Changelog":      "On",
+    "HeadersDiff":    "On",
+    "PkgDiff":        "Off",
+    "ABIView":        "Off",
+    "ABIDiff":        "Off",
+    "PublicSymbols":  "public_symbols/openjpeg/current/list",
+    "PublicTypes":    "public_types/openjpeg/current/list"
+  },
+  {
+    "Number":         "2.1",
+    "Installed":      "installed/openjpeg/2.1",
+    "Source":         "src/openjpeg/2.1/version.2.1.tar.gz",
+    "Changelog":      "NEWS",
+    "HeadersDiff":    "On",
+    "PkgDiff":        "Off",
+    "ABIView":        "Off",
+    "ABIDiff":        "Off",
+    "PublicSymbols":  "public_symbols/openjpeg/2.1/list",
+    "PublicTypes":    "public_types/openjpeg/2.1/list"
+  },
+  {
+    "Number":         "2.0.1",
+    "Installed":      "installed/openjpeg/2.0.1",
+    "Source":         "src/openjpeg/2.0.1/version.2.0.1.tar.gz",
+    "Changelog":      "NEWS",
+    "HeadersDiff":    "On",
+    "PkgDiff":        "Off",
+    "ABIView":        "Off",
+    "ABIDiff":        "Off",
+    "PublicSymbols":  "public_symbols/openjpeg/2.0.1/list",
+    "PublicTypes":    "public_types/openjpeg/2.0.1/list"
+  },
+  {
+    "Number":         "2.0",
+    "Installed":      "installed/openjpeg/2.0",
+    "Source":         "src/openjpeg/2.0/version.2.0.tar.gz",
+    "Changelog":      "NEWS",
+    "HeadersDiff":    "On",
+    "PkgDiff":        "On",
+    "ABIView":        "Off",
+    "ABIDiff":        "Off",
+    "PublicSymbols":  "public_symbols/openjpeg/2.0/list",
+    "PublicTypes":    "public_types/openjpeg/2.0/list"
+  },
+  {
+    "Number":         "1.5.2",
+    "Installed":      "installed/openjpeg/1.5.2",
+    "Source":         "src/openjpeg/1.5.2/version.1.5.2.tar.gz",
+    "Changelog":      "NEWS",
+    "HeadersDiff":    "On",
+    "PkgDiff":        "Off",
+    "ABIView":        "Off",
+    "ABIDiff":        "Off",
+    "PublicSymbols":  "public_symbols/openjpeg/1.5.2/list",
+    "PublicTypes":    "public_types/openjpeg/1.5.2/list"
+  },
+  {
+    "Number":         "1.5.1",
+    "Installed":      "installed/openjpeg/1.5.1",
+    "Source":         "src/openjpeg/1.5.1/version.1.5.1.tar.gz",
+    "Changelog":      "NEWS",
+    "HeadersDiff":    "On",
+    "PkgDiff":        "Off",
+    "ABIView":        "Off",
+    "ABIDiff":        "Off",
+    "PublicSymbols":  "public_symbols/openjpeg/1.5.1/list",
+    "PublicTypes":    "public_types/openjpeg/1.5.1/list"
+  },
+  {
+    "Number":         "1.5",
+    "Installed":      "installed/openjpeg/1.5",
+    "Source":         "src/openjpeg/1.5/version.1.5.tar.gz",
+    "Changelog":      "NEWS",
+    "HeadersDiff":    "On",
+    "PkgDiff":        "Off",
+    "ABIView":        "Off",
+    "ABIDiff":        "Off",
+    "PublicSymbols":  "public_symbols/openjpeg/1.5/list",
+    "PublicTypes":    "public_types/openjpeg/1.5/list"
+  },
+  {
+    "Number":         "1.4",
+    "Installed":      "installed/openjpeg/1.4",
+    "Source":         "src/openjpeg/1.4/version.1.4.tar.gz",
+    "Changelog":      "CHANGES",
+    "HeadersDiff":    "On",
+    "PkgDiff":        "Off",
+    "ABIView":        "Off",
+    "ABIDiff":        "Off",
+    "PublicSymbols":  "public_symbols/openjpeg/1.4/list",
+    "PublicTypes":    "public_types/openjpeg/1.4/list"
+  },
+  {
+    "Number":         "1.3",
+    "Installed":      "installed/openjpeg/1.3",
+    "Source":         "src/openjpeg/1.3/version.1.3.tar.gz",
+    "Changelog":      "ChangeLog",
+    "HeadersDiff":    "On",
+    "PkgDiff":        "Off",
+    "ABIView":        "Off",
+    "ABIDiff":        "Off",
+    "PublicSymbols":  "public_symbols/openjpeg/1.3/list",
+    "PublicTypes":    "public_types/openjpeg/1.3/list"
+  },
+  {
+    "Number":         "1.2",
+    "Installed":      "installed/openjpeg/1.2",
+    "Source":         "src/openjpeg/1.2/version.1.2.tar.gz",
+    "Changelog":      "ChangeLog",
+    "HeadersDiff":    "On",
+    "PkgDiff":        "Off",
+    "ABIView":        "Off",
+    "ABIDiff":        "Off",
+    "PublicSymbols":  "public_symbols/openjpeg/1.2/list",
+    "PublicTypes":    "public_types/openjpeg/1.2/list"
+  }]
+}
index 6d50b3f5757110096ef1ff3c778b4911bfd5b373..f8b23ada38897d0d4ed66bff5fa765ea56b9e9cb 100644 (file)
@@ -7,8 +7,21 @@
 cmake_minimum_required(VERSION 2.8)
 
 set( ENV{LANG} en_US.UTF-8)
-set( CTEST_DASHBOARD_ROOT  "$ENV{PWD}/build" )
-set( CTEST_CMAKE_GENERATOR "Unix Makefiles")   # Always makefile in travis-ci environment
+if($ENV{OPJ_BINARY_DIR})
+       set( CTEST_DASHBOARD_ROOT  "$ENV{OPJ_BINARY_DIR}" )
+else()
+       set( CTEST_DASHBOARD_ROOT  "$ENV{PWD}/build" )
+endif()
+
+if("$ENV{TRAVIS_OS_NAME}" STREQUAL "windows")
+       set( CTEST_CMAKE_GENERATOR "NMake Makefiles")
+       set( CTEST_BUILD_COMMAND   "nmake" )
+       set( JPYLYZER_EXT          "exe"  )
+else()
+       set( CTEST_CMAKE_GENERATOR "Unix Makefiles")   # Always makefile in travis-ci environment
+       set( CCFLAGS_WARNING "-Wall -Wextra -Wconversion -Wno-unused-parameter -Wdeclaration-after-statement")
+       set( JPYLYZER_EXT          "py"  )
+endif()
 
 if ("$ENV{OPJ_BUILD_CONFIGURATION}" STREQUAL "")
   set( CTEST_BUILD_CONFIGURATION "Release")
@@ -66,8 +79,12 @@ if(NOT "$ENV{OPJ_CI_SKIP_TESTS}" STREQUAL "1")
        # Note: Binaries can only be used for non-commercial purposes.
        if ("$ENV{OPJ_NONCOMMERCIAL}" STREQUAL "1" )
                set(KDUPATH $ENV{PWD}/kdu)
-               set(ENV{LD_LIBRARY_PATH} ${KDUPATH})
-               set(ENV{PATH} $ENV{PATH}:${KDUPATH})
+               if("$ENV{TRAVIS_OS_NAME}" STREQUAL "windows")
+                       set(ENV{PATH} "$ENV{PATH};${KDUPATH}")
+               else()
+                       set(ENV{LD_LIBRARY_PATH} ${KDUPATH})
+                       set(ENV{PATH} $ENV{PATH}:${KDUPATH})
+               endif()
        endif()
        set(BUILD_TESTING "TRUE")
 else()
@@ -81,7 +98,7 @@ set( CACHE_CONTENTS "
 CMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION}
 
 # Warning level
-CMAKE_C_FLAGS:STRING= ${CCFLAGS_ARCH} -Wall -Wextra -Wconversion -Wno-unused-parameter -Wdeclaration-after-statement
+CMAKE_C_FLAGS:STRING= ${CCFLAGS_ARCH} ${CCFLAGS_WARNING}
 
 # Use to activate the test suite
 BUILD_TESTING:BOOL=${BUILD_TESTING}
@@ -93,7 +110,7 @@ BUILD_THIRDPARTY:BOOL=TRUE
 OPJ_DATA_ROOT:PATH=$ENV{PWD}/data
 
 # jpylyzer is available with on GitHub: https://github.com/openpreserve/jpylyzer  
-JPYLYZER_EXECUTABLE=$ENV{PWD}/jpylyzer/jpylyzer/jpylyzer.py
+JPYLYZER_EXECUTABLE=$ENV{PWD}/jpylyzer/jpylyzer.${JPYLYZER_EXT}
 
 " )
 
diff --git a/tools/travis-ci/abi-check.sh b/tools/travis-ci/abi-check.sh
new file mode 100755 (executable)
index 0000000..3eb6e18
--- /dev/null
@@ -0,0 +1,85 @@
+#!/bin/bash
+
+# This script executes the abi-check step when running under travis-ci (in run step)
+
+# Set-up some bash options
+set -o nounset   ## set -u : exit the script if you try to use an uninitialised variable
+set -o errexit   ## set -e : exit the script if any statement returns a non-true return value
+set -o pipefail  ## Fail on error in pipe
+set -o xtrace    ## set -x : Print a trace of simple commands and their arguments after they are expanded and before they are executed.
+
+# Exit if not ABI check
+if [ "${OPJ_CI_ABI_CHECK:-}" != "1" ]; then
+       exit 0
+fi
+
+OPJ_UPLOAD_ABI_REPORT=0
+OPJ_LIMIT_ABI_BUILDS="-limit 2"
+if [ "${TRAVIS_REPO_SLUG:-}" != "" ]; then
+       if [ "$(echo "${TRAVIS_REPO_SLUG}" | sed 's/\(^.*\)\/.*/\1/')" == "uclouvain" ] && [ "${TRAVIS_PULL_REQUEST:-}" == "false" ]; then
+               # Upload report
+               OPJ_UPLOAD_ABI_REPORT=1
+               # Build full report
+               OPJ_LIMIT_ABI_BUILDS=
+       fi
+fi
+
+OPJ_SOURCE_DIR=$(cd $(dirname $0)/../.. && pwd)
+
+
+mkdir ${HOME}/abi-check
+cd ${HOME}/abi-check
+# Let's get tools not available with apt
+mkdir tools
+# Travis doesn't allow package wdiff...
+wget -qO - http://mirrors.kernel.org/gnu/wdiff/wdiff-latest.tar.gz | tar -xz
+cd wdiff-*
+./configure --prefix=${HOME}/abi-check/tools/wdiff &> /dev/null
+make &> /dev/null
+make check &> /dev/null
+make install &> /dev/null
+cd ..
+export PATH=${PWD}/tools/wdiff/bin:$PATH
+
+wget -qO - https://tools.ietf.org/tools/rfcdiff/rfcdiff-1.42.tgz | tar -xz
+mv rfcdiff-1.42 ${PWD}/tools/rfcdiff
+export PATH=${PWD}/tools/rfcdiff:$PATH
+wget -qO - https://github.com/lvc/installer/archive/0.4.tar.gz | tar -xz
+mkdir ${PWD}/tools/abi-tracker
+make -C installer-0.4 install prefix=${PWD}/tools/abi-tracker target=abi-tracker
+export PATH=${PWD}/tools/abi-tracker/bin:$PATH
+
+mkdir tracker
+cd tracker
+
+# Let's create all we need
+grep -v Git ${OPJ_SOURCE_DIR}/tools/abi-tracker/openjpeg.json > ./openjpeg.json
+abi-monitor ${OPJ_LIMIT_ABI_BUILDS} -get openjpeg.json
+if [ "${OPJ_LIMIT_ABI_BUILDS}" != "" ]; then
+       cp -f ${OPJ_SOURCE_DIR}/tools/abi-tracker/openjpeg.json ./openjpeg.json
+else
+       # Old versions of openjpeg don't like -fvisibility=hidden...
+       grep -v Configure ${OPJ_SOURCE_DIR}/tools/abi-tracker/openjpeg.json > ./openjpeg.json
+fi
+cp -rf ${OPJ_SOURCE_DIR} src/openjpeg/current
+abi-monitor ${OPJ_LIMIT_ABI_BUILDS} -build openjpeg.json
+abi-tracker -build openjpeg.json
+
+EXIT_CODE=0
+
+# Check API
+abi-compliance-checker -l openjpeg -old $(find ./abi_dump/openjpeg/2.1 -name '*.dump') -new $(find ./abi_dump/openjpeg/current -name '*.dump') -header openjpeg.h -api -s || EXIT_CODE=1
+
+# Check ABI
+if [ "${OPJ_LIMIT_ABI_BUILDS}" != "" ]; then
+       abi-compliance-checker -l openjpeg -old $(find ./abi_dump/openjpeg/2.1 -name '*.dump') -new $(find ./abi_dump/openjpeg/current -name '*.dump') -header openjpeg.h -abi -s || EXIT_CODE=1
+else
+       echo "Disable ABI check for now, problems with symbol visibility..."
+fi
+
+rm -rf src installed
+
+if [ ${OPJ_UPLOAD_ABI_REPORT} -eq 1 ]; then
+       echo "TODO: Where to upload the report"
+fi
+exit $EXIT_CODE
index 11dcf26cbc3b930466e682e694e4328e91e0ae56..61debd9509cebd313483ee1289333cbb1e07e377 100755 (executable)
@@ -2,6 +2,17 @@
 
 # This script executes the install step when running under travis-ci
 
+#if cygwin, check path
+case ${MACHTYPE} in
+       *cygwin*) OPJ_CI_IS_CYGWIN=1;;
+       *) ;;
+esac
+
+if [ "${OPJ_CI_IS_CYGWIN:-}" == "1" ]; then
+       # PATH is not yet set up
+       export PATH=$PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
+fi
+
 # Set-up some error handling
 set -o nounset   ## set -u : exit the script if you try to use an uninitialised variable
 set -o errexit   ## set -e : exit the script if any statement returns a non-true return value
@@ -19,66 +30,86 @@ function exit_handler ()
 trap exit_handler EXIT
 trap exit ERR
 
-# We don't need anything for coverity scan builds
-
-if [ "${COVERITY_SCAN_BRANCH:-}" != "1" ]; then
+# We don't need anything for coverity scan builds. ABI check is managed in abi-check.sh
+if [ "${COVERITY_SCAN_BRANCH:-}" == "1" ] || [ "${OPJ_CI_ABI_CHECK:-}" == "1" ]; then
+       exit 0
+fi
 
-       if [ "${OPJ_CI_ASAN:-}" == "1" ]; then
-               # We need a new version of cmake than travis-ci provides
-               wget -qO - http://www.cmake.org/files/v3.3/cmake-3.3.1-Linux-x86_64.tar.gz | tar -xz
-               # copy to a directory that will not changed every version
-               mv cmake-3.3.1-Linux-x86_64 cmake-install
-       fi
+if [ "${OPJ_CI_ASAN:-}" == "1" ]; then
+       # We need a new version of cmake than travis-ci provides
+       wget -qO - http://www.cmake.org/files/v3.3/cmake-3.3.1-Linux-x86_64.tar.gz | tar -xz
+       # copy to a directory that will not changed every version
+       mv cmake-3.3.1-Linux-x86_64 cmake-install
+fi
 
-       if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then
+if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then
 
-               OPJ_SOURCE_DIR=$(cd $(dirname $0)/../.. && pwd)
+       OPJ_SOURCE_DIR=$(cd $(dirname $0)/../.. && pwd)
 
-               # We need test data
-               if [ "${TRAVIS_BRANCH:-}" == "" ]; then
-                       TRAVIS_BRANCH=$(git -C ${OPJ_SOURCE_DIR} branch | grep '*' | tr -d '*[[:blank:]]') #default to same branch as we're setting up
-               fi
-               OPJ_DATA_HAS_BRANCH=$(git ls-remote --heads git://github.com/uclouvain/openjpeg-data.git ${TRAVIS_BRANCH} | wc -l)
-               if [ ${OPJ_DATA_HAS_BRANCH} -ne 0 ]; then
-                       OPJ_DATA_BRANCH=${TRAVIS_BRANCH}
-               else
-                       OPJ_DATA_BRANCH=master #default to master
-               fi
-               echo "Cloning openjpeg-data from ${OPJ_DATA_BRANCH} branch"
-               git clone --depth=1 --branch=${OPJ_DATA_BRANCH} git://github.com/uclouvain/openjpeg-data.git data
+       # We need test data
+       if [ "${TRAVIS_BRANCH:-}" != "" ]; then
+               OPJ_DATA_BRANCH=${TRAVIS_BRANCH}
+       elif [ "${APPVEYOR_REPO_BRANCH:-}" != "" ]; then
+               OPJ_DATA_BRANCH=${APPVEYOR_REPO_BRANCH}
+       else
+               OPJ_DATA_BRANCH=$(git -C ${OPJ_SOURCE_DIR} branch | grep '*' | tr -d '*[[:blank:]]') #default to same branch as we're setting up
+       fi
+       OPJ_DATA_HAS_BRANCH=$(git ls-remote --heads git://github.com/uclouvain/openjpeg-data.git ${OPJ_DATA_BRANCH} | wc -l)
+       if [ ${OPJ_DATA_HAS_BRANCH} -eq 0 ]; then
+               OPJ_DATA_BRANCH=master #default to master
+       fi
+       echo "Cloning openjpeg-data from ${OPJ_DATA_BRANCH} branch"
+       git clone --depth=1 --branch=${OPJ_DATA_BRANCH} git://github.com/uclouvain/openjpeg-data.git data
 
-               # We need jpylyzer for the test suite
-               echo "Retrieving jpylyzer"
+       # We need jpylyzer for the test suite
+       echo "Retrieving jpylyzer"
+       if [ "${APPVEYOR:-}" == "True" ]; then
+               wget --local-encoding=UTF-8 -q http://dl.bintray.com/openplanets/opf-windows/jpylyzer_1.14.2_win32.zip
+               mkdir jpylyzer
+               cd jpylyzer
+               cmake -E tar -xf ../jpylyzer_1.14.2_win32.zip
+               cd ..
+       else
                wget -qO - https://github.com/openpreserve/jpylyzer/archive/1.14.2.tar.gz | tar -xz
-               mv jpylyzer-1.14.2 jpylyzer
-               chmod +x jpylyzer/jpylyzer/jpylyzer.py
+               mv jpylyzer-1.14.2/jpylyzer ./
+               chmod +x jpylyzer/jpylyzer.py
+       fi
 
-               # When OPJ_NONCOMMERCIAL=1, kakadu trial binaries are used for testing. Here's the copyright notice from kakadu:
-               # Copyright is owned by NewSouth Innovations Pty Limited, commercial arm of the UNSW Australia in Sydney.
-               # You are free to trial these executables and even to re-distribute them, 
-               # so long as such use or re-distribution is accompanied with this copyright notice and is not for commercial gain.
-               # Note: Binaries can only be used for non-commercial purposes.
-               if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ]; then
-                       if [ "${TRAVIS_OS_NAME:-}" == "linux" ] || uname -s | grep -i Linux &> /dev/null; then
-                               echo "Retrieving Kakadu"
-                               wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_Linux-x86-64_150710.zip
-                               cmake -E tar -xf KDU77_Demo_Apps_for_Linux-x86-64_150710.zip
-                               mv KDU77_Demo_Apps_for_Linux-x86-64_150710 kdu
-                       elif [ "${TRAVIS_OS_NAME:-}" == "osx" ] || uname -s | grep -i Darwin &> /dev/null; then
-                               echo "Retrieving Kakadu"
-                               wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_OSX109_150710.dmg_.zip
-                               cmake -E tar -xf KDU77_Demo_Apps_for_OSX109_150710.dmg_.zip
-                               wget -q http://downloads.sourceforge.net/project/catacombae/HFSExplorer/0.23/hfsexplorer-0.23-bin.zip
-                               mkdir hfsexplorer && cmake -E chdir hfsexplorer tar -xf ../hfsexplorer-0.23-bin.zip
-                               ./hfsexplorer/bin/unhfs.sh -o ./ -fsroot Kakadu-demo-apps.pkg  KDU77_Demo_Apps_for_OSX109_150710.dmg
-                               pkgutil --expand Kakadu-demo-apps.pkg ./kdu
-                               cd kdu
-                               cat libkduv77r.pkg/Payload | gzip -d | cpio -id
-                               cat kduexpand.pkg/Payload | gzip -d | cpio -id
-                               cat kducompress.pkg/Payload | gzip -d | cpio -id
-                               install_name_tool -id ${PWD}/libkdu_v77R.dylib libkdu_v77R.dylib 
-                               install_name_tool -change /usr/local/lib/libkdu_v77R.dylib ${PWD}/libkdu_v77R.dylib kdu_compress
-                               install_name_tool -change /usr/local/lib/libkdu_v77R.dylib ${PWD}/libkdu_v77R.dylib kdu_expand
+       # When OPJ_NONCOMMERCIAL=1, kakadu trial binaries are used for testing. Here's the copyright notice from kakadu:
+       # Copyright is owned by NewSouth Innovations Pty Limited, commercial arm of the UNSW Australia in Sydney.
+       # You are free to trial these executables and even to re-distribute them, 
+       # so long as such use or re-distribution is accompanied with this copyright notice and is not for commercial gain.
+       # Note: Binaries can only be used for non-commercial purposes.
+       if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ]; then
+               if [ "${TRAVIS_OS_NAME:-}" == "linux" ] || uname -s | grep -i Linux &> /dev/null; then
+                       echo "Retrieving Kakadu"
+                       wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_Linux-x86-64_150710.zip
+                       cmake -E tar -xf KDU77_Demo_Apps_for_Linux-x86-64_150710.zip
+                       mv KDU77_Demo_Apps_for_Linux-x86-64_150710 kdu
+               elif [ "${TRAVIS_OS_NAME:-}" == "osx" ] || uname -s | grep -i Darwin &> /dev/null; then
+                       echo "Retrieving Kakadu"
+                       wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_OSX109_150710.dmg_.zip
+                       cmake -E tar -xf KDU77_Demo_Apps_for_OSX109_150710.dmg_.zip
+                       wget -q http://downloads.sourceforge.net/project/catacombae/HFSExplorer/0.23/hfsexplorer-0.23-bin.zip
+                       mkdir hfsexplorer && cmake -E chdir hfsexplorer tar -xf ../hfsexplorer-0.23-bin.zip
+                       ./hfsexplorer/bin/unhfs.sh -o ./ -fsroot Kakadu-demo-apps.pkg  KDU77_Demo_Apps_for_OSX109_150710.dmg
+                       pkgutil --expand Kakadu-demo-apps.pkg ./kdu
+                       cd kdu
+                       cat libkduv77r.pkg/Payload | gzip -d | cpio -id
+                       cat kduexpand.pkg/Payload | gzip -d | cpio -id
+                       cat kducompress.pkg/Payload | gzip -d | cpio -id
+                       install_name_tool -id ${PWD}/libkdu_v77R.dylib libkdu_v77R.dylib 
+                       install_name_tool -change /usr/local/lib/libkdu_v77R.dylib ${PWD}/libkdu_v77R.dylib kdu_compress
+                       install_name_tool -change /usr/local/lib/libkdu_v77R.dylib ${PWD}/libkdu_v77R.dylib kdu_expand
+               elif [ "${APPVEYOR:-}" == "True" ] || uname -s | grep -i MINGW &> /dev/null || uname -s | grep -i CYGWIN &> /dev/null; then
+                       echo "Retrieving Kakadu"
+                       wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_Win32_150710.msi_.zip
+                       cmake -E tar -xf KDU77_Demo_Apps_for_Win32_150710.msi_.zip
+                       msiexec /i KDU77_Demo_Apps_for_Win32_150710.msi /quiet /qn /norestart
+                       if [ -d "C:/Program Files/Kakadu" ]; then
+                               cp -r "C:/Program Files/Kakadu" ./kdu
+                       else
+                               cp -r "C:/Program Files (x86)/Kakadu" ./kdu
                        fi
                fi
        fi
diff --git a/tools/travis-ci/knownfailures-Ubuntu12.04-gcc4.6.4-i386-Release-3rdP.txt b/tools/travis-ci/knownfailures-Ubuntu12.04-gcc4.6.4-i386-Release-3rdP.txt
new file mode 100644 (file)
index 0000000..bad4597
--- /dev/null
@@ -0,0 +1,61 @@
+NR-ENC-issue203-32x32-bgr16.bmp-43-compare_dump2base
+NR-ENC-issue203-32x32-bgr16.bmp-43-compare_dec-ref-out2base
+NR-ENC-issue203-33x33-bgr16.bmp-44-compare_dump2base
+NR-ENC-issue203-33x33-bgr16.bmp-44-compare_dec-ref-out2base
+NR-ENC-issue203-32x32-bgra16.bmp-45-compare_dump2base
+NR-ENC-issue203-33x33-bgra16.bmp-46-compare_dump2base
+NR-ENC-issue203-127x64-bgr16.bmp-49-compare_dump2base
+NR-ENC-issue203-127x64-bgr16.bmp-49-compare_dec-ref-out2base
+NR-DEC-issue104_jpxstream.jp2-33-decode-md5
+NR-DEC-issue226.j2k-74-decode
+NR-DEC-issue226.j2k-74-decode-md5
+NR-DEC-p1_06.j2k-156-decode
+NR-DEC-p1_06.j2k-156-decode-md5
+NR-DEC-p1_06.j2k-164-decode-md5
+NR-C1P0-p0_04.j2k-compare2base
+NR-C1P0-p0_05.j2k-compare2base
+NR-C1P0-p0_06.j2k-compare2base
+NR-C1P1-p1_02.j2k-compare2base
+NR-C1P1-p1_03.j2k-compare2base
+NR-C1P1-p1_04.j2k-compare2base
+NR-C1P1-p1_05.j2k-compare2base
+NR-JP2-file2.jp2-compare2base
+NR-JP2-file3.jp2-compare2base
+NR-RIC-subsampling_1.jp2-compare2base
+NR-RIC-subsampling_2.jp2-compare2base
+NR-RIC-zoo1.jp2-compare2base
+NR-RIC-zoo2.jp2-compare2base
+NR-DEC-_00042.j2k-2-decode-md5
+NR-DEC-buxI.j2k-9-decode-md5
+NR-DEC-CT_Phillips_JPEG2K_Decompr_Problem.j2k-13-decode-md5
+NR-DEC-Marrin.jp2-18-decode-md5
+NR-DEC-kodak_2layers_lrcp.j2c-31-decode-md5
+NR-DEC-kodak_2layers_lrcp.j2c-32-decode-md5
+NR-DEC-file409752.jp2-40-decode-md5
+NR-DEC-issue188_beach_64bitsbox.jp2-41-decode-md5
+NR-DEC-issue206_image-000.jp2-42-decode-md5
+NR-DEC-issue205.jp2-43-decode-md5
+NR-DEC-issue228.j2k-60-decode-md5
+NR-DEC-issue134.jp2-67-decode-md5
+NR-DEC-issue208.jp2-69-decode-md5
+NR-DEC-issue211.jp2-70-decode-md5
+NR-DEC-issue135.j2k-68-decode-md5
+NR-DEC-issue414.jp2-110-decode-md5
+NR-DEC-p1_04.j2k-124-decode-md5
+NR-DEC-p1_04.j2k-125-decode-md5
+NR-DEC-p1_04.j2k-126-decode-md5
+NR-DEC-p1_04.j2k-127-decode-md5
+NR-DEC-p1_04.j2k-128-decode-md5
+NR-DEC-p1_04.j2k-129-decode-md5
+NR-DEC-p1_04.j2k-131-decode-md5
+NR-DEC-p1_04.j2k-134-decode-md5
+NR-DEC-p1_04.j2k-138-decode-md5
+NR-DEC-p1_04.j2k-140-decode-md5
+NR-DEC-p0_04.j2k-166-decode-md5
+NR-DEC-p0_04.j2k-168-decode-md5
+NR-DEC-p0_04.j2k-172-decode-md5
+NR-DEC-issue205.jp2-253-decode-md5
+NR-DEC-issue559-eci-090-CIELab.jp2-255-decode-md5
+NR-DEC-issue236-ESYCC-CDEF.jp2-254-decode-md5
+NR-DEC-issue559-eci-091-CIELab.jp2-256-decode-md5
+NR-DEC-p1_06.j2k-164-decode
diff --git a/tools/travis-ci/knownfailures-windows-vs2010-x86-Release-3rdP.txt b/tools/travis-ci/knownfailures-windows-vs2010-x86-Release-3rdP.txt
new file mode 100644 (file)
index 0000000..70b6d98
--- /dev/null
@@ -0,0 +1,44 @@
+NR-C1P0-p0_04.j2k-compare2base
+NR-C1P0-p0_05.j2k-compare2base
+NR-C1P0-p0_06.j2k-compare2base
+NR-C1P1-p1_02.j2k-compare2base
+NR-C1P1-p1_03.j2k-compare2base
+NR-C1P1-p1_04.j2k-compare2base
+NR-C1P1-p1_05.j2k-compare2base
+NR-RIC-subsampling_1.jp2-compare2base
+NR-RIC-subsampling_2.jp2-compare2base
+NR-RIC-zoo1.jp2-compare2base
+NR-RIC-zoo2.jp2-compare2base
+NR-ENC-Bretagne2.ppm-7-compare_dec-ref-out2base
+NR-DEC-_00042.j2k-2-decode-md5
+NR-DEC-buxI.j2k-9-decode-md5
+NR-DEC-CT_Phillips_JPEG2K_Decompr_Problem.j2k-13-decode-md5
+NR-DEC-Marrin.jp2-18-decode-md5
+NR-DEC-kodak_2layers_lrcp.j2c-31-decode-md5
+NR-DEC-kodak_2layers_lrcp.j2c-32-decode-md5
+NR-DEC-file409752.jp2-40-decode-md5
+NR-DEC-issue188_beach_64bitsbox.jp2-41-decode-md5
+NR-DEC-issue206_image-000.jp2-42-decode-md5
+NR-DEC-issue205.jp2-43-decode-md5
+NR-DEC-issue228.j2k-60-decode-md5
+NR-DEC-issue134.jp2-67-decode-md5
+NR-DEC-issue208.jp2-69-decode-md5
+NR-DEC-issue211.jp2-70-decode-md5
+NR-DEC-issue414.jp2-110-decode-md5
+NR-DEC-p1_04.j2k-124-decode-md5
+NR-DEC-p1_04.j2k-125-decode-md5
+NR-DEC-p1_04.j2k-126-decode-md5
+NR-DEC-p1_04.j2k-127-decode-md5
+NR-DEC-p1_04.j2k-128-decode-md5
+NR-DEC-p1_04.j2k-129-decode-md5
+NR-DEC-p1_04.j2k-131-decode-md5
+NR-DEC-p1_04.j2k-134-decode-md5
+NR-DEC-p1_04.j2k-138-decode-md5
+NR-DEC-p1_04.j2k-140-decode-md5
+NR-DEC-p0_04.j2k-166-decode-md5
+NR-DEC-p0_04.j2k-168-decode-md5
+NR-DEC-p0_04.j2k-172-decode-md5
+NR-DEC-issue205.jp2-253-decode-md5
+NR-DEC-issue236-ESYCC-CDEF.jp2-254-decode-md5
+NR-DEC-issue559-eci-090-CIELab.jp2-255-decode-md5
+NR-DEC-issue559-eci-091-CIELab.jp2-256-decode-md5
diff --git a/tools/travis-ci/knownfailures-windows-vs2015-x64-Release-3rdP.txt b/tools/travis-ci/knownfailures-windows-vs2015-x64-Release-3rdP.txt
new file mode 100644 (file)
index 0000000..c0f64cc
--- /dev/null
@@ -0,0 +1,3 @@
+NR-ENC-Bretagne2.ppm-7-compare_dec-ref-out2base
+NR-DEC-kodak_2layers_lrcp.j2c-31-decode-md5
+NR-DEC-kodak_2layers_lrcp.j2c-32-decode-md5
diff --git a/tools/travis-ci/knownfailures-windows-vs2015-x86-Release-3rdP.txt b/tools/travis-ci/knownfailures-windows-vs2015-x86-Release-3rdP.txt
new file mode 100644 (file)
index 0000000..c0f64cc
--- /dev/null
@@ -0,0 +1,3 @@
+NR-ENC-Bretagne2.ppm-7-compare_dec-ref-out2base
+NR-DEC-kodak_2layers_lrcp.j2c-31-decode-md5
+NR-DEC-kodak_2layers_lrcp.j2c-32-decode-md5
index bec41d6d3d2140f155c334d79c60d2d9a95dc204..7d6bd141af73ad8afc091e71c035b9e77eada332 100755 (executable)
@@ -2,11 +2,34 @@
 
 # This script executes the script step when running under travis-ci
 
+#if cygwin, check path
+case ${MACHTYPE} in
+       *cygwin*) OPJ_CI_IS_CYGWIN=1;;
+       *) ;;
+esac
+
+# Hack for appveyor to get GNU find in path before windows one.
+export PATH=$(dirname ${BASH}):$PATH
+
 # Set-up some bash options
 set -o nounset   ## set -u : exit the script if you try to use an uninitialised variable
 set -o errexit   ## set -e : exit the script if any statement returns a non-true return value
 set -o pipefail  ## Fail on error in pipe
 
+function opjpath ()
+{
+       if [ "${OPJ_CI_IS_CYGWIN:-}" == "1" ]; then
+               cygpath $1 "$2"
+       else
+               echo "$2"
+       fi
+}
+
+# ABI check is done by abi-check.sh
+if [ "${OPJ_CI_ABI_CHECK:-}" == "1" ]; then
+       exit 0
+fi
+
 # Set-up some variables
 if [ "${OPJ_CI_BUILD_CONFIGURATION:-}" == "" ]; then
        export OPJ_CI_BUILD_CONFIGURATION=Release #default
@@ -22,6 +45,12 @@ if [ "${TRAVIS_REPO_SLUG:-}" != "" ]; then
        if [ "${OPJ_OWNER}" == "uclouvain" ]; then
                OPJ_DO_SUBMIT=1
        fi
+elif [ "${APPVEYOR_REPO_NAME:-}" != "" ]; then
+       OPJ_OWNER=$(echo "${APPVEYOR_REPO_NAME}" | sed 's/\(^.*\)\/.*/\1/')
+       OPJ_SITE="${OPJ_OWNER}.appveyor.com"
+       if [ "${OPJ_OWNER}" == "uclouvain" ]; then
+               OPJ_DO_SUBMIT=1
+       fi
 else
        OPJ_SITE="$(hostname)"
 fi
@@ -37,6 +66,10 @@ if [ "${TRAVIS_OS_NAME:-}" == "" ]; then
                        # default to gcc
                        export CC=gcc
                fi
+       elif uname -s | grep -i CYGWIN &> /dev/null; then
+               TRAVIS_OS_NAME=windows
+       elif uname -s | grep -i MINGW &> /dev/null; then
+               TRAVIS_OS_NAME=windows
        else
                echo "Failed to guess OS"; exit 1
        fi
@@ -66,6 +99,26 @@ elif [ "${TRAVIS_OS_NAME}" == "linux" ]; then
        else
                echo "Compiler not supported: ${CC}"; exit 1
        fi
+elif [ "${TRAVIS_OS_NAME}" == "windows" ]; then
+       OPJ_OS_NAME=windows
+       if which cl > /dev/null; then
+               OPJ_CL_VERSION=$(cl 2>&1 | grep Version | sed 's/.*Version \([0-9]*\).*/\1/')
+               if [ ${OPJ_CL_VERSION} -eq 19 ]; then
+                       OPJ_CC_VERSION=vs2015
+               elif [ ${OPJ_CL_VERSION} -eq 18 ]; then
+                       OPJ_CC_VERSION=vs2013
+               elif [ ${OPJ_CL_VERSION} -eq 17 ]; then
+                       OPJ_CC_VERSION=vs2012
+               elif [ ${OPJ_CL_VERSION} -eq 16 ]; then
+                       OPJ_CC_VERSION=vs2010
+               elif [ ${OPJ_CL_VERSION} -eq 15 ]; then
+                       OPJ_CC_VERSION=vs2008
+               elif [ ${OPJ_CL_VERSION} -eq 14 ]; then
+                       OPJ_CC_VERSION=vs2005
+               else
+                       OPJ_CC_VERSION=vs????
+               fi
+       fi
 else
        echo "OS not supported: ${TRAVIS_OS_NAME}"; exit 1
 fi
@@ -80,14 +133,20 @@ if [ "${OPJ_CI_ARCH:-}" == "" ]; then
 fi
 
 if [ "${TRAVIS_BRANCH:-}" == "" ]; then
-       echo "Guessing branch"
-       TRAVIS_BRANCH=$(git -C ${OPJ_SOURCE_DIR} branch | grep '*' | tr -d '*[[:blank:]]') #default to master
+       if [ "${APPVEYOR_REPO_BRANCH:-}" != "" ]; then
+               TRAVIS_BRANCH=${APPVEYOR_REPO_BRANCH}
+       else
+               echo "Guessing branch"
+               TRAVIS_BRANCH=$(git -C ${OPJ_SOURCE_DIR} branch | grep '*' | tr -d '*[[:blank:]]')
+       fi
 fi
 
 OPJ_BUILDNAME=${OPJ_OS_NAME}-${OPJ_CC_VERSION}-${OPJ_CI_ARCH}-${TRAVIS_BRANCH}
 OPJ_BUILDNAME_TEST=${OPJ_OS_NAME}-${OPJ_CC_VERSION}-${OPJ_CI_ARCH}
 if [ "${TRAVIS_PULL_REQUEST:-}" != "false" ] && [ "${TRAVIS_PULL_REQUEST:-}" != "" ]; then
        OPJ_BUILDNAME=${OPJ_BUILDNAME}-pr${TRAVIS_PULL_REQUEST}
+elif [ "${APPVEYOR_PULL_REQUEST_NUMBER:-}" != "" ]; then
+       OPJ_BUILDNAME=${OPJ_BUILDNAME}-pr${APPVEYOR_PULL_REQUEST_NUMBER}
 fi
 OPJ_BUILDNAME=${OPJ_BUILDNAME}-${OPJ_CI_BUILD_CONFIGURATION}-3rdP
 OPJ_BUILDNAME_TEST=${OPJ_BUILDNAME_TEST}-${OPJ_CI_BUILD_CONFIGURATION}-3rdP
@@ -115,9 +174,11 @@ set -x
 # travis-ci doesn't dump cmake version in system info, let's print it 
 cmake --version
 
+export TRAVIS_OS_NAME=${TRAVIS_OS_NAME}
 export OPJ_SITE=${OPJ_SITE}
 export OPJ_BUILDNAME=${OPJ_BUILDNAME}
-export OPJ_SOURCE_DIR=${OPJ_SOURCE_DIR}
+export OPJ_SOURCE_DIR=$(opjpath -m ${OPJ_SOURCE_DIR})
+export OPJ_BINARY_DIR=$(opjpath -m ${PWD}/build)
 export OPJ_BUILD_CONFIGURATION=${OPJ_CI_BUILD_CONFIGURATION}
 export OPJ_DO_SUBMIT=${OPJ_DO_SUBMIT}
 
@@ -176,11 +237,11 @@ if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then
                        awk -F: '{ print $2 }' ${OPJ_FAILEDTEST_LOG} > failures.txt
                        while read FAILEDTEST; do
                                # Start with common errors
-                               if grep -x "${FAILEDTEST}" ${OPJ_SOURCE_DIR}/tools/travis-ci/knownfailures-all.txt > /dev/null; then
+                               if grep -x "${FAILEDTEST}" $(opjpath -u ${OPJ_SOURCE_DIR})/tools/travis-ci/knownfailures-all.txt > /dev/null; then
                                        continue
                                fi
-                               if [ -f ${OPJ_SOURCE_DIR}/tools/travis-ci/knownfailures-${OPJ_BUILDNAME_TEST}.txt ]; then
-                                       if grep -x "${FAILEDTEST}" ${OPJ_SOURCE_DIR}/tools/travis-ci/knownfailures-${OPJ_BUILDNAME_TEST}.txt > /dev/null; then
+                               if [ -f $(opjpath -u ${OPJ_SOURCE_DIR})/tools/travis-ci/knownfailures-${OPJ_BUILDNAME_TEST}.txt ]; then
+                                       if grep -x "${FAILEDTEST}" $(opjpath -u ${OPJ_SOURCE_DIR})/tools/travis-ci/knownfailures-${OPJ_BUILDNAME_TEST}.txt > /dev/null; then
                                                continue
                                        fi
                                fi
@@ -207,8 +268,6 @@ New/unknown test failure found!!!
                        OPJ_CI_RESULT=1
                fi
        fi
-
-
 fi
 
 exit ${OPJ_CI_RESULT}