[tracker-miners/sam/extract-tests-rename] functional-tests: Rename extractor tests to show file formats more clearly



commit 5cb232f0283ed0217cd79e6e75357971a9fda392
Author: Sam Thursfield <sam afuera me uk>
Date:   Tue Oct 1 01:06:56 2019 +0200

    functional-tests: Rename extractor tests to show file formats more clearly
    
    Each filename now contains the file format that is being tested as the
    first item. This should help developers when you want to see at a glance
    which extractors are being tested by which test cases.

 tests/functional-tests/410-extractor-decorator.py  |   6 +-
 tests/functional-tests/meson.build                 |  36 +++++------
 .../audio/audio-test-1.expected.json               |  69 ---------------------
 .../audio/audio-test-2.expected.json               |  66 --------------------
 .../audio-test-vorbis-extractor.expected.json      |  63 -------------------
 .../audio/empty_albumi_song3.expected.json         |  11 ----
 .../mp3-id3v2.3-empty-artist-album.expected.json   |  11 ++++
 ...ong3.mp3 => mp3-id3v2.3-empty-artist-album.mp3} | Bin
 .../audio/mp3-id3v2.4-1.expected.json              |  67 ++++++++++++++++++++
 .../audio/{audio-test-1.mp3 => mp3-id3v2.4-1.mp3}  | Bin
 .../audio/mp3-id3v2.4-2.expected.json              |  64 +++++++++++++++++++
 .../audio/{audio-test-2.mp3 => mp3-id3v2.4-2.mp3}  | Bin
 .../audio/vorbis.expected.json                     |  63 +++++++++++++++++++
 ...{audio-test-vorbis-extractor.ogg => vorbis.ogg} | Bin
 .../images/comment-extension-block.expected.json   |  13 ----
 .../images/corrupted-image.expected.json           |  11 ----
 .../gif-comment-extension-block.expected.json      |  16 +++++
 ...n-block.gif => gif-comment-extension-block.gif} | Bin
 .../images/gif-corrupted-image.expected.json       |  11 ++++
 ...corrupted-image.gif => gif-corrupted-image.gif} | Bin
 .../images/gif-xmp.expected.json                   |  23 +++++++
 .../images/{xmp-loaded-1.gif => gif-xmp.gif}       | Bin
 ...ge-1.expected.json => jpeg-basic.expected.json} |   2 +-
 .../images/{test-image-1.jpg => jpeg-basic.jpg}    | Bin
 ....expected.json => jpeg-iptc-tags.expected.json} |   2 +-
 .../images/jpeg-iptcdata-records.expected.json     |  11 ++++
 ...cdata-records.jpg => jpeg-iptcdata-records.jpg} | Bin
 .../images/jpeg-region-of-interest.expected.json   |  15 +++++
 .../{roi.jpg => jpeg-region-of-interest.jpg}       | Bin
 .../images/png-basic.expected.json                 |  12 ++++
 .../images/{test-image-2.png => png-basic.png}     | Bin
 .../images/png-region-of-interest.expected.json    |  16 +++++
 .../{roi2.png => png-region-of-interest.png}       | Bin
 .../images/{test-image-4.CR2 => raw-cr2.cr2}       | Bin
 .../images/raw-cr2.expected.json                   |  24 +++++++
 .../test-extraction-data/images/roi.expected.json  |  13 ----
 .../test-extraction-data/images/roi2.expected.json |  13 ----
 .../images/test-image-2.expected.json              |  12 ----
 .../images/test-image-3.expected.json              |  16 -----
 .../images/test-image-4.expected.json              |  25 --------
 .../images/test-iptcdata-records.expected.json     |  11 ----
 .../images/tiff-basic.expected.json                |  16 +++++
 .../images/{test-image-3.tif => tiff-basic.tiff}   | Bin
 .../images/xmp-loaded-1.expected.json              |  18 ------
 .../video/184505.expected.json                     |  13 ----
 .../video/mov-basic.expected.json                  |  12 ++++
 .../video/{video-2.mov => mov-basic.mov}           | Bin
 .../video/mp4-basic.expected.json                  |  12 ++++
 .../video/{video-1.mp4 => mp4-basic.mp4}           | Bin
 .../video/mp4-video-without-audio.expected.json    |  13 ++++
 .../{184505.mp4 => mp4-video-without-audio.mp4}    | Bin
 .../video/video-1.expected.json                    |  12 ----
 .../video/video-2.expected.json                    |  12 ----
 53 files changed, 407 insertions(+), 403 deletions(-)
---
diff --git a/tests/functional-tests/410-extractor-decorator.py 
b/tests/functional-tests/410-extractor-decorator.py
index 351d5b079..67a76e796 100755
--- a/tests/functional-tests/410-extractor-decorator.py
+++ b/tests/functional-tests/410-extractor-decorator.py
@@ -27,13 +27,9 @@ import unittest as ut
 import minertest
 
 
-CORRUPT_FILE = os.path.join(
-    os.path.dirname(__file__), 'test-extraction-data', 'audio',
-    'audio-corrupt.mp3')
-
 VALID_FILE = os.path.join(
     os.path.dirname(__file__), 'test-extraction-data', 'audio',
-    'audio-test-1.mp3')
+    'mp3-id3v2.4-1.mp3')
 VALID_FILE_CLASS = 'http://www.tracker-project.org/temp/nmm#MusicPiece'
 VALID_FILE_TITLE = 'Simply Juvenile'
 
diff --git a/tests/functional-tests/meson.build b/tests/functional-tests/meson.build
index 827e82a1e..aec96f4bd 100644
--- a/tests/functional-tests/meson.build
+++ b/tests/functional-tests/meson.build
@@ -25,9 +25,9 @@ config_json = configure_file(
 )
 
 extractor_tests = [
-  'audio/audio-test-1',
-  'audio/empty_albumi_song3',
-  'audio/audio-test-2',
+  'audio/mp3-id3v2.4-1',
+  'audio/mp3-id3v2.3-empty-artist-album',
+  'audio/mp3-id3v2.4-2',
 ]
 
 if get_option('unzip_ps_gz_files')
@@ -35,47 +35,47 @@ if get_option('unzip_ps_gz_files')
 endif
 
 if libvorbis.found()
-  extractor_tests += 'audio/audio-test-vorbis-extractor'
+  extractor_tests += 'audio/vorbis'
 endif
 
 if libjpeg.found() and exempi.found() and libexif.found()
   extractor_tests += [
-    'images/test-image-1',
-    'images/roi',
+    'images/jpeg-basic',
+    'images/jpeg-region-of-interest',
   ]
 
   if libiptcdata.found()
     extractor_tests += [
-      'images/test-image-1-iptc-tags',
-      'images/test-iptcdata-records',
+      'images/jpeg-iptc-tags',
+      'images/jpeg-iptcdata-records',
     ]
   endif
 endif
 
 if libgif.found()
   extractor_tests += [
-    'images/corrupted-image',
-    'images/comment-extension-block',
+    'images/gif-comment-extension-block',
+    'images/gif-corrupted-image',
   ]
 
   if exempi.found()
-    extractor_tests += 'images/xmp-loaded-1'
+    extractor_tests += 'images/gif-xmp'
   endif
 endif
 
 if libpng.found()
   extractor_tests += [
-    'images/roi2',
-    'images/test-image-2',
+    'images/png-basic',
+    'images/png-region-of-interest',
   ]
 endif
 
 if libtiff.found()
-  extractor_tests += 'images/test-image-3'
+  extractor_tests += 'images/tiff-basic'
 endif
 
 if gexiv2.found()
-  extractor_tests += 'images/test-image-4'
+  extractor_tests += 'images/raw-cr2'
 endif
 
 if totem_plparser.found()
@@ -124,9 +124,9 @@ detect_h264_codec_result = run_command(detect_h264_codec)
 
 if detect_h264_codec_result.returncode() == 0
   extractor_tests += [
-    'video/184505',
-    'video/video-1',
-    'video/video-2',
+    'video/mov-basic',
+    'video/mp4-basic',
+    'video/mp4-video-without-audio',
   ]
 else
   # FIXME: it would be nicer to visibly mark the tests as 'skipped', but the Meson
diff --git a/tests/functional-tests/test-extraction-data/audio/mp3-id3v2.3-empty-artist-album.expected.json 
b/tests/functional-tests/test-extraction-data/audio/mp3-id3v2.3-empty-artist-album.expected.json
new file mode 100644
index 000000000..544cfbd6c
--- /dev/null
+++ b/tests/functional-tests/test-extraction-data/audio/mp3-id3v2.3-empty-artist-album.expected.json
@@ -0,0 +1,11 @@
+{
+  "test": {
+    "Filename": "mp3-id3v2.3-empty-artist-album.mp3",
+    "Bugzilla": "NB#223536, NB#223148",
+    "Comment": "Mp3 with empty Artist and album. Made extractor crash."
+  },
+  "metadata": {
+    "@type": "nmm:MusicPiece",
+    "nie:title": "song3"
+  }
+}
diff --git a/tests/functional-tests/test-extraction-data/audio/empty_albumi_song3.mp3 
b/tests/functional-tests/test-extraction-data/audio/mp3-id3v2.3-empty-artist-album.mp3
similarity index 100%
rename from tests/functional-tests/test-extraction-data/audio/empty_albumi_song3.mp3
rename to tests/functional-tests/test-extraction-data/audio/mp3-id3v2.3-empty-artist-album.mp3
diff --git a/tests/functional-tests/test-extraction-data/audio/mp3-id3v2.4-1.expected.json 
b/tests/functional-tests/test-extraction-data/audio/mp3-id3v2.4-1.expected.json
new file mode 100644
index 000000000..02d6538a0
--- /dev/null
+++ b/tests/functional-tests/test-extraction-data/audio/mp3-id3v2.4-1.expected.json
@@ -0,0 +1,67 @@
+{
+  "test": {
+    "Filename": "mp3-id3v2.4-1.mp3",
+    "Bugzilla": "",
+    "Comment": "Basic MP3 example"
+  },
+  "metadata": {
+    "@type": "nmm:MusicPiece",
+    "nie:title": "Simply Juvenile",
+    "nfo:genre": "Pop",
+    "nie:copyright": "none",
+    "nie:comment": "I am for simple MP3 testing",
+    "nmm:trackNumber": "13",
+    "nfo:codec": "MPEG",
+    "nfo:channels": "1",
+    "nfo:duration": "15",
+    "nfo:sampleRate": "22050",
+    "nfo:averageBitrate": "32000",
+    "nmm:performer": {
+      "@type": "nmm:Artist",
+      "nmm:artistName": "AbBaby",
+      "tracker:hasExternalReference": {
+        "@id": "tracker:ExternalReference:https:%2F%2Fmusicbrainz.org%2Fdoc%2FArtist",
+        "@type": "tracker:ExternalReference",
+        "tracker:referenceSource": "https://musicbrainz.org/doc/Artist";,
+        "tracker:referenceIdentifier": "234561"
+      }
+    },
+    "nmm:musicAlbum": {
+      "@type": "nmm:MusicAlbum",
+      "nie:title": "SinCos",
+      "tracker:hasExternalReference": [
+        {
+          "@id": "tracker:ExternalReference:https:%2F%2Fmusicbrainz.org%2Fdoc%2FRelease",
+          "@type": "tracker:ExternalReference",
+          "tracker:referenceSource": "https://musicbrainz.org/doc/Release";,
+          "tracker:referenceIdentifier": "345612"
+        },
+        {
+          "@id": "tracker:ExternalReference:https:%2F%2Fmusicbrainz.org%2Fdoc%2FRelease_Group",
+          "@type": "tracker:ExternalReference",
+          "tracker:referenceSource": "https://musicbrainz.org/doc/Release_Group";,
+          "tracker:referenceIdentifier": "561234"
+        }
+      ]
+    },
+    "tracker:hasExternalReference": [
+      {
+        "@id": "tracker:ExternalReference:https:%2F%2Fmusicbrainz.org%2Fdoc%2FRecording",
+        "@type": "tracker:ExternalReference",
+        "tracker:referenceSource": "https://musicbrainz.org/doc/Recording";,
+        "tracker:referenceIdentifier": "456123"
+      },
+      {
+        "@id": "tracker:ExternalReference:https:%2F%2Fmusicbrainz.org%2Fdoc%2FTrack",
+        "@type": "tracker:ExternalReference",
+        "tracker:referenceSource": "https://musicbrainz.org/doc/Track";,
+        "tracker:referenceIdentifier": "123456"
+      }
+    ],
+    "nfo:hasHash": {
+      "@type": "nfo:hasHash",
+      "nfo:hashAlgorithm": "chromaprint",
+      "nfo:hashValue": "111222"
+    }
+  }
+}
diff --git a/tests/functional-tests/test-extraction-data/audio/audio-test-1.mp3 
b/tests/functional-tests/test-extraction-data/audio/mp3-id3v2.4-1.mp3
similarity index 100%
rename from tests/functional-tests/test-extraction-data/audio/audio-test-1.mp3
rename to tests/functional-tests/test-extraction-data/audio/mp3-id3v2.4-1.mp3
diff --git a/tests/functional-tests/test-extraction-data/audio/mp3-id3v2.4-2.expected.json 
b/tests/functional-tests/test-extraction-data/audio/mp3-id3v2.4-2.expected.json
new file mode 100644
index 000000000..741109415
--- /dev/null
+++ b/tests/functional-tests/test-extraction-data/audio/mp3-id3v2.4-2.expected.json
@@ -0,0 +1,64 @@
+{
+  "test": {
+    "Filename": "mp3-id3v2.4-2.mp3",
+    "Bugzilla": "NB#177663",
+    "Comment": "Mp3 with id3v2 tags. Encoded wasn't extracted.\nBinary cut with dd of the original file."
+  },
+  "metadata": {
+    "@type": "nmm:MusicPiece",
+    "nie:title": "Vinegar",
+    "nfo:genre": "Pop",
+    "nie:copyright": "(P) 2008 Sony Music Entertainment Finland Oy",
+    "nmm:trackNumber": "1",
+    "nfo:codec": "MPEG",
+    "nfo:channels": "2",
+    "nfo:sampleRate": "44100",
+    "nfo:averageBitrate": "256000",
+    "nmm:performer": {
+      "@type": "nmm:Artist",
+      "nmm:artistName": "Anna Abreu",
+      "tracker:hasExternalReference": {
+        "@id": "tracker:ExternalReference:https:%2F%2Fmusicbrainz.org%2Fdoc%2FArtist",
+        "@type": "tracker:ExternalReference",
+        "tracker:referenceSource": "https://musicbrainz.org/doc/Artist";,
+        "tracker:referenceIdentifier": "234561"
+      }
+    },
+    "nmm:musicAlbum": {
+      "@type": "nmm:MusicAlbum",
+      "tracker:hasExternalReference": [
+        {
+          "@id": "tracker:ExternalReference:https:%2F%2Fmusicbrainz.org%2Fdoc%2FRelease",
+          "@type": "tracker:ExternalReference",
+          "tracker:referenceSource": "https://musicbrainz.org/doc/Release";,
+          "tracker:referenceIdentifier": "345612"
+        },
+        {
+          "@id": "tracker:ExternalReference:https:%2F%2Fmusicbrainz.org%2Fdoc%2FRelease_Group",
+          "@type": "tracker:ExternalReference",
+          "tracker:referenceSource": "https://musicbrainz.org/doc/Release_Group";,
+          "tracker:referenceIdentifier": "561234"
+        }
+      ]
+    },
+    "tracker:hasExternalReference": [
+      {
+        "@id": "tracker:ExternalReference:https:%2F%2Fmusicbrainz.org%2Fdoc%2FRecording",
+        "@type": "tracker:ExternalReference",
+        "tracker:referenceSource": "https://musicbrainz.org/doc/Recording";,
+        "tracker:referenceIdentifier": "456123"
+      },
+      {
+        "@id": "tracker:ExternalReference:https:%2F%2Fmusicbrainz.org%2Fdoc%2FTrack",
+        "@type": "tracker:ExternalReference",
+        "tracker:referenceSource": "https://musicbrainz.org/doc/Track";,
+        "tracker:referenceIdentifier": "123456"
+      }
+    ],
+    "nfo:hasHash": {
+      "@type": "nfo:hasHash",
+      "nfo:hashAlgorithm": "chromaprint",
+      "nfo:hashValue": "111222"
+    }
+  }
+}
diff --git a/tests/functional-tests/test-extraction-data/audio/audio-test-2.mp3 
b/tests/functional-tests/test-extraction-data/audio/mp3-id3v2.4-2.mp3
similarity index 100%
rename from tests/functional-tests/test-extraction-data/audio/audio-test-2.mp3
rename to tests/functional-tests/test-extraction-data/audio/mp3-id3v2.4-2.mp3
diff --git a/tests/functional-tests/test-extraction-data/audio/vorbis.expected.json 
b/tests/functional-tests/test-extraction-data/audio/vorbis.expected.json
new file mode 100644
index 000000000..16b642202
--- /dev/null
+++ b/tests/functional-tests/test-extraction-data/audio/vorbis.expected.json
@@ -0,0 +1,63 @@
+{
+  "test": {
+    "Filename": "vorbis.ogg",
+    "Bugzilla": "",
+    "Comment": "Basic OGG example"
+  },
+  "metadata": {
+    "@type": "nmm:MusicPiece",
+    "nie:title": "Simply Juvenile",
+    "nfo:genre": "Pop",
+    "nie:copyright": "none",
+    "nie:comment": "I am for simple OGG testing",
+    "nmm:trackNumber": "18",
+    "nfo:duration": "15",
+    "nmm:performer": {
+      "@type": "nmm:Artist",
+      "nmm:artistName": "AbBaby",
+      "tracker:hasExternalReference": {
+        "@id": "tracker:ExternalReference:https:%2F%2Fmusicbrainz.org%2Fdoc%2FArtist",
+        "@type": "tracker:ExternalReference",
+        "tracker:referenceSource": "https://musicbrainz.org/doc/Artist";,
+        "tracker:referenceIdentifier": "234561"
+      }
+    },
+    "nmm:musicAlbum": {
+      "@type": "nmm:MusicAlbum",
+      "nie:title": "SinCos",
+      "tracker:hasExternalReference": [
+        {
+          "@id": "tracker:ExternalReference:https:%2F%2Fmusicbrainz.org%2Fdoc%2FRelease",
+          "@type": "tracker:ExternalReference",
+          "tracker:referenceSource": "https://musicbrainz.org/doc/Release";,
+          "tracker:referenceIdentifier": "345612"
+        },
+        {
+          "@id": "tracker:ExternalReference:https:%2F%2Fmusicbrainz.org%2Fdoc%2FRelease_Group",
+          "@type": "tracker:ExternalReference",
+          "tracker:referenceSource": "https://musicbrainz.org/doc/Release_Group";,
+          "tracker:referenceIdentifier": "561234"
+        }
+      ]
+    },
+    "tracker:hasExternalReference": [
+      {
+        "@id": "tracker:ExternalReference:https:%2F%2Fmusicbrainz.org%2Fdoc%2FRecording",
+        "@type": "tracker:ExternalReference",
+        "tracker:referenceSource": "https://musicbrainz.org/doc/Recording";,
+        "tracker:referenceIdentifier": "456123"
+      },
+      {
+        "@id": "tracker:ExternalReference:https:%2F%2Fmusicbrainz.org%2Fdoc%2FTrack",
+        "@type": "tracker:ExternalReference",
+        "tracker:referenceSource": "https://musicbrainz.org/doc/Track";,
+        "tracker:referenceIdentifier": "123456"
+      }
+    ],
+    "nfo:hasHash": {
+      "@type": "nfo:hasHash",
+      "nfo:hashAlgorithm": "chromaprint",
+      "nfo:hashValue": "111222"
+    }
+  }
+}
diff --git a/tests/functional-tests/test-extraction-data/audio/audio-test-vorbis-extractor.ogg 
b/tests/functional-tests/test-extraction-data/audio/vorbis.ogg
similarity index 100%
rename from tests/functional-tests/test-extraction-data/audio/audio-test-vorbis-extractor.ogg
rename to tests/functional-tests/test-extraction-data/audio/vorbis.ogg
diff --git a/tests/functional-tests/test-extraction-data/images/gif-comment-extension-block.expected.json 
b/tests/functional-tests/test-extraction-data/images/gif-comment-extension-block.expected.json
new file mode 100644
index 000000000..2d9e84c21
--- /dev/null
+++ b/tests/functional-tests/test-extraction-data/images/gif-comment-extension-block.expected.json
@@ -0,0 +1,16 @@
+{
+  "test": {
+    "Filename": "gif-comment-extension-block.gif",
+    "Bugzilla": "GB#633118",
+    "Comment": "In GIF comments can come in a special block that needs to be handled manually"
+  },
+  "metadata": {
+    "@type": [
+      "nfo:Image ",
+      "nmm:Photo"
+    ],
+    "nfo:width": "600",
+    "nfo:height": "450",
+    "nie:comment": "GIF image format only supports comments in 7-bit ASCII encoding!"
+  }
+}
diff --git a/tests/functional-tests/test-extraction-data/images/comment-extension-block.gif 
b/tests/functional-tests/test-extraction-data/images/gif-comment-extension-block.gif
similarity index 100%
rename from tests/functional-tests/test-extraction-data/images/comment-extension-block.gif
rename to tests/functional-tests/test-extraction-data/images/gif-comment-extension-block.gif
diff --git a/tests/functional-tests/test-extraction-data/images/gif-corrupted-image.expected.json 
b/tests/functional-tests/test-extraction-data/images/gif-corrupted-image.expected.json
new file mode 100644
index 000000000..e4f96e663
--- /dev/null
+++ b/tests/functional-tests/test-extraction-data/images/gif-corrupted-image.expected.json
@@ -0,0 +1,11 @@
+{
+  "test": {
+    "Filename": "gif-corrupted-image.gif",
+    "Bugzilla": "NB#184882",
+    "Comment": "This image make the extractor crash",
+    "ExpectedFailure": true
+  },
+  "metadata": {
+    "@type": "nmm:Photo"
+  }
+}
diff --git a/tests/functional-tests/test-extraction-data/images/corrupted-image.gif 
b/tests/functional-tests/test-extraction-data/images/gif-corrupted-image.gif
similarity index 100%
rename from tests/functional-tests/test-extraction-data/images/corrupted-image.gif
rename to tests/functional-tests/test-extraction-data/images/gif-corrupted-image.gif
diff --git a/tests/functional-tests/test-extraction-data/images/gif-xmp.expected.json 
b/tests/functional-tests/test-extraction-data/images/gif-xmp.expected.json
new file mode 100644
index 000000000..903d90a5c
--- /dev/null
+++ b/tests/functional-tests/test-extraction-data/images/gif-xmp.expected.json
@@ -0,0 +1,23 @@
+{
+  "test": {
+    "Filename": "gif-xmp.gif",
+    "Comment": "GIF with XMP metadata (injected with exiftool)"
+  },
+  "metadata": {
+    "@type": [
+      "nfo:Image",
+      "nmm:Photo"
+    ],
+    "nie:description": "Test file for the tracker XMP extraction",
+    "nie:title": "A random GIF",
+    "nao:hasTag": {
+      "nao:prefLabel": "nice"
+    },
+    "dc:identifier": "test-file-01-world-domination-path",
+    "dc:source": "http://www.fotonatura.org/revista/articulos/293/3/";,
+    "dc:language": "es_ES",
+    "dc:coverage": "from Helsinki all around the world",
+    "nfo:width": "165",
+    "nfo:height": "66"
+  }
+}
diff --git a/tests/functional-tests/test-extraction-data/images/xmp-loaded-1.gif 
b/tests/functional-tests/test-extraction-data/images/gif-xmp.gif
similarity index 100%
rename from tests/functional-tests/test-extraction-data/images/xmp-loaded-1.gif
rename to tests/functional-tests/test-extraction-data/images/gif-xmp.gif
diff --git a/tests/functional-tests/test-extraction-data/images/test-image-1.expected.json 
b/tests/functional-tests/test-extraction-data/images/jpeg-basic.expected.json
similarity index 93%
rename from tests/functional-tests/test-extraction-data/images/test-image-1.expected.json
rename to tests/functional-tests/test-extraction-data/images/jpeg-basic.expected.json
index a13ee20cf..3ef0f5223 100644
--- a/tests/functional-tests/test-extraction-data/images/test-image-1.expected.json
+++ b/tests/functional-tests/test-extraction-data/images/jpeg-basic.expected.json
@@ -1,6 +1,6 @@
 {
     "test": {
-        "Filename": "test-image-1.jpg",
+        "Filename": "jpeg-basic.jpg",
         "Comment": "Basic jpeg example"
     },
     "metadata": {
diff --git a/tests/functional-tests/test-extraction-data/images/test-image-1.jpg 
b/tests/functional-tests/test-extraction-data/images/jpeg-basic.jpg
similarity index 100%
rename from tests/functional-tests/test-extraction-data/images/test-image-1.jpg
rename to tests/functional-tests/test-extraction-data/images/jpeg-basic.jpg
diff --git a/tests/functional-tests/test-extraction-data/images/test-image-1-iptc-tags.expected.json 
b/tests/functional-tests/test-extraction-data/images/jpeg-iptc-tags.expected.json
similarity index 85%
rename from tests/functional-tests/test-extraction-data/images/test-image-1-iptc-tags.expected.json
rename to tests/functional-tests/test-extraction-data/images/jpeg-iptc-tags.expected.json
index 37b8a65d9..699480dda 100644
--- a/tests/functional-tests/test-extraction-data/images/test-image-1-iptc-tags.expected.json
+++ b/tests/functional-tests/test-extraction-data/images/jpeg-iptc-tags.expected.json
@@ -1,6 +1,6 @@
 {
     "test": {
-        "Filename": "test-image-1.jpg",
+        "Filename": "jpeg-basic.jpg",
         "Comment": "Basic jpeg example, ISO image tags checks"
     },
     "metadata": {
diff --git a/tests/functional-tests/test-extraction-data/images/jpeg-iptcdata-records.expected.json 
b/tests/functional-tests/test-extraction-data/images/jpeg-iptcdata-records.expected.json
new file mode 100644
index 000000000..e4c299094
--- /dev/null
+++ b/tests/functional-tests/test-extraction-data/images/jpeg-iptcdata-records.expected.json
@@ -0,0 +1,11 @@
+{
+  "test": {
+    "Filename": "jpeg-iptcdata-records.jpg",
+    "Bugzilla": "NB#244267",
+    "Comment": "Location information shouldn't be retrieved from the image"
+  },
+  "metadata": {
+    "@type": "nmm:Photo",
+    "!slo:location": ""
+  }
+}
diff --git a/tests/functional-tests/test-extraction-data/images/test-iptcdata-records.jpg 
b/tests/functional-tests/test-extraction-data/images/jpeg-iptcdata-records.jpg
similarity index 100%
rename from tests/functional-tests/test-extraction-data/images/test-iptcdata-records.jpg
rename to tests/functional-tests/test-extraction-data/images/jpeg-iptcdata-records.jpg
diff --git a/tests/functional-tests/test-extraction-data/images/jpeg-region-of-interest.expected.json 
b/tests/functional-tests/test-extraction-data/images/jpeg-region-of-interest.expected.json
new file mode 100644
index 000000000..5f5bbcef7
--- /dev/null
+++ b/tests/functional-tests/test-extraction-data/images/jpeg-region-of-interest.expected.json
@@ -0,0 +1,15 @@
+{
+  "test": {
+    "Filename": "jpeg-region-of-interest.jpg",
+    "Comment": "JPG with regions of interest in the XMP"
+  },
+  "metadata": {
+    "@type": [
+      "nfo:Image",
+      "nmm:Photo"
+    ],
+    "nfo:hasRegionOfInterest": "@URNUUID@",
+    "nfo:width": "128",
+    "nfo:height": "128"
+  }
+}
diff --git a/tests/functional-tests/test-extraction-data/images/roi.jpg 
b/tests/functional-tests/test-extraction-data/images/jpeg-region-of-interest.jpg
similarity index 100%
rename from tests/functional-tests/test-extraction-data/images/roi.jpg
rename to tests/functional-tests/test-extraction-data/images/jpeg-region-of-interest.jpg
diff --git a/tests/functional-tests/test-extraction-data/images/png-basic.expected.json 
b/tests/functional-tests/test-extraction-data/images/png-basic.expected.json
new file mode 100644
index 000000000..2915abda7
--- /dev/null
+++ b/tests/functional-tests/test-extraction-data/images/png-basic.expected.json
@@ -0,0 +1,12 @@
+{
+  "test": {
+    "Filename": "png-basic.png",
+    "Bugzilla": "",
+    "Comment": "Basic png example"
+  },
+  "metadata": {
+    "@type": "nmm:Photo",
+    "nfo:width": "211",
+    "nfo:height": "217"
+  }
+}
diff --git a/tests/functional-tests/test-extraction-data/images/test-image-2.png 
b/tests/functional-tests/test-extraction-data/images/png-basic.png
similarity index 100%
rename from tests/functional-tests/test-extraction-data/images/test-image-2.png
rename to tests/functional-tests/test-extraction-data/images/png-basic.png
diff --git a/tests/functional-tests/test-extraction-data/images/png-region-of-interest.expected.json 
b/tests/functional-tests/test-extraction-data/images/png-region-of-interest.expected.json
new file mode 100644
index 000000000..cd535fd98
--- /dev/null
+++ b/tests/functional-tests/test-extraction-data/images/png-region-of-interest.expected.json
@@ -0,0 +1,16 @@
+{
+  "test": {
+    "Filename": "png-region-of-interest.png",
+    "Bugzilla": "",
+    "Comment": "PNG with regions of interest in the XMP"
+  },
+  "metadata": {
+    "@type": [
+      "nfo:Image",
+      "nmm:Photo"
+    ],
+    "nfo:hasRegionOfInterest": "@URNUUID@",
+    "nfo:width": "128",
+    "nfo:height": "128"
+  }
+}
diff --git a/tests/functional-tests/test-extraction-data/images/roi2.png 
b/tests/functional-tests/test-extraction-data/images/png-region-of-interest.png
similarity index 100%
rename from tests/functional-tests/test-extraction-data/images/roi2.png
rename to tests/functional-tests/test-extraction-data/images/png-region-of-interest.png
diff --git a/tests/functional-tests/test-extraction-data/images/test-image-4.CR2 
b/tests/functional-tests/test-extraction-data/images/raw-cr2.cr2
similarity index 100%
rename from tests/functional-tests/test-extraction-data/images/test-image-4.CR2
rename to tests/functional-tests/test-extraction-data/images/raw-cr2.cr2
diff --git a/tests/functional-tests/test-extraction-data/images/raw-cr2.expected.json 
b/tests/functional-tests/test-extraction-data/images/raw-cr2.expected.json
new file mode 100644
index 000000000..83cf1f70c
--- /dev/null
+++ b/tests/functional-tests/test-extraction-data/images/raw-cr2.expected.json
@@ -0,0 +1,24 @@
+{
+  "test": {
+    "Filename": "raw-cr2.cr2",
+    "Bugzilla": "",
+    "Comment": "Basic RAW example"
+  },
+  "metadata": {
+    "@type": "nmm:Photo",
+    "nfo:equipment": {
+      "nfo:manufacturer": "Canon",
+      "nfo:model": "Canon EOS 70D",
+      "@type": "nfo:Equipment"
+    },
+    "nfo:width": "5472",
+    "nfo:height": "3648",
+    "nfo:orientation": "nfo:orientation-left",
+    "nmm:flash": "nmm:flash-off",
+    "nmm:fnumber": "4.0",
+    "nmm:focalLength": "18.0",
+    "nmm:isoSpeed": "1250.0",
+    "nmm:meteringMode": "nmm:metering-mode-pattern",
+    "nmm:whiteBalance": "nmm:white-balance-auto"
+  }
+}
diff --git a/tests/functional-tests/test-extraction-data/images/tiff-basic.expected.json 
b/tests/functional-tests/test-extraction-data/images/tiff-basic.expected.json
new file mode 100644
index 000000000..272158a47
--- /dev/null
+++ b/tests/functional-tests/test-extraction-data/images/tiff-basic.expected.json
@@ -0,0 +1,16 @@
+{
+  "test": {
+    "Filename": "tiff-basic.tiff",
+    "Bugzilla": "",
+    "Comment": "Basic TIFF example"
+  },
+  "metadata": {
+    "@type": "nmm:Photo",
+    "nfo:width": "37",
+    "nfo:height": "39",
+    "nie:title": "/home/amit/Desktop/test-image-3.tif",
+    "nfo:orientation": {
+      "@id": "nfo:orientation-top"
+    }
+  }
+}
diff --git a/tests/functional-tests/test-extraction-data/images/test-image-3.tif 
b/tests/functional-tests/test-extraction-data/images/tiff-basic.tiff
similarity index 100%
rename from tests/functional-tests/test-extraction-data/images/test-image-3.tif
rename to tests/functional-tests/test-extraction-data/images/tiff-basic.tiff
diff --git a/tests/functional-tests/test-extraction-data/video/mov-basic.expected.json 
b/tests/functional-tests/test-extraction-data/video/mov-basic.expected.json
new file mode 100644
index 000000000..8ab24d01a
--- /dev/null
+++ b/tests/functional-tests/test-extraction-data/video/mov-basic.expected.json
@@ -0,0 +1,12 @@
+{
+  "test": {
+    "Filename": "mov-basic.mov",
+    "Bugzilla": "NB#181112",
+    "Comment": "Produces a Critical in Gstreamer freeing a component."
+  },
+  "metadata": {
+    "@type": "nmm:Video",
+    "nfo:height": "144",
+    "nfo:width": "192"
+  }
+}
diff --git a/tests/functional-tests/test-extraction-data/video/video-2.mov 
b/tests/functional-tests/test-extraction-data/video/mov-basic.mov
similarity index 100%
rename from tests/functional-tests/test-extraction-data/video/video-2.mov
rename to tests/functional-tests/test-extraction-data/video/mov-basic.mov
diff --git a/tests/functional-tests/test-extraction-data/video/mp4-basic.expected.json 
b/tests/functional-tests/test-extraction-data/video/mp4-basic.expected.json
new file mode 100644
index 000000000..f004530e3
--- /dev/null
+++ b/tests/functional-tests/test-extraction-data/video/mp4-basic.expected.json
@@ -0,0 +1,12 @@
+{
+  "test": {
+    "Filename": "mp4-basic.mp4",
+    "Comment": "Just one standard mp4"
+  },
+  "metadata": {
+    "@type": "nmm:Video",
+    "nie:title": "MPEG-4-x264.mp4",
+    "nfo:height": "240",
+    "nfo:width": "320"
+  }
+}
diff --git a/tests/functional-tests/test-extraction-data/video/video-1.mp4 
b/tests/functional-tests/test-extraction-data/video/mp4-basic.mp4
similarity index 100%
rename from tests/functional-tests/test-extraction-data/video/video-1.mp4
rename to tests/functional-tests/test-extraction-data/video/mp4-basic.mp4
diff --git a/tests/functional-tests/test-extraction-data/video/mp4-video-without-audio.expected.json 
b/tests/functional-tests/test-extraction-data/video/mp4-video-without-audio.expected.json
new file mode 100644
index 000000000..57b116b58
--- /dev/null
+++ b/tests/functional-tests/test-extraction-data/video/mp4-video-without-audio.expected.json
@@ -0,0 +1,13 @@
+{
+  "test": {
+    "Filename": "mp4-video-without-audio.mp4",
+    "Bugzilla": "NB#184505",
+    "Comment": "Video without audio stream. Seems to be clasified as Audio."
+  },
+  "metadata": {
+    "@type": "nmm:Video",
+    "!@type": "nmm:Audio",
+    "nfo:height": "480",
+    "nfo:width": "864"
+  }
+}
diff --git a/tests/functional-tests/test-extraction-data/video/184505.mp4 
b/tests/functional-tests/test-extraction-data/video/mp4-video-without-audio.mp4
similarity index 100%
rename from tests/functional-tests/test-extraction-data/video/184505.mp4
rename to tests/functional-tests/test-extraction-data/video/mp4-video-without-audio.mp4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]