Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d3de4b79 authored by Sascha Haeberling's avatar Sascha Haeberling Committed by Android Git Automerger
Browse files

am c20802f0: Remove all the tests from Gallery2 until we have them sorted out.

* commit 'c20802f0':
  Remove all the tests from Gallery2 until we have them sorted out.
parents 8073625e c20802f0
Loading
Loading
Loading
Loading

tests/Android.mk

deleted100644 → 0
+0 −18
Original line number Diff line number Diff line
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

# We only want this apk build for tests.
LOCAL_MODULE_TAGS := tests

LOCAL_SDK_VERSION := 16

LOCAL_STATIC_JAVA_LIBRARIES := littlemock dexmaker

# Include all test java files.
LOCAL_SRC_FILES := $(call all-java-files-under, src)

LOCAL_PACKAGE_NAME := Gallery2Tests

LOCAL_INSTRUMENTATION_FOR := Gallery2

include $(BUILD_PACKAGE)

tests/AndroidManifest.xml

deleted100644 → 0
+0 −48
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.android.gallery3d.tests">

    <application
        android:debuggable="true">
        <uses-library android:name="android.test.runner" />
    </application>

    <instrumentation android:name="android.test.InstrumentationTestRunner"
             android:targetPackage="com.android.gallery3d"
             android:label="Tests for GalleryNew3D application."/>

    <instrumentation android:name="com.android.gallery3d.CameraTestRunner"
            android:targetPackage="com.android.gallery3d"
            android:label="Camera continuous test runner"/>

    <instrumentation android:name="com.android.gallery3d.exif.ExifTestRunner"
            android:targetPackage="com.android.gallery3d"
            android:label="Tests for ExifParser."/>

    <instrumentation android:name="com.android.gallery3d.jpegstream.JpegStreamTestRunner"
            android:targetPackage="com.android.gallery3d"
            android:label="Tests for JpegStream classes."/>

    <instrumentation android:name="com.android.gallery3d.stress.CameraStressTestRunner"
            android:targetPackage="com.android.gallery3d"
            android:label="Camera stress test runner"/>

    <instrumentation android:name="com.android.photos.data.DataTestRunner"
            android:targetPackage="com.android.gallery3d"
            android:label="Tests for android photo DataProviders."/>
</manifest>

tests/exiftool_parser/parser.py

deleted100755 → 0
+0 −90
Original line number Diff line number Diff line
#!/usr/bin/env python
#
# This parser parses the output from Phil Harvey's exiftool (version 9.02)
# and convert it to xml format. It reads exiftool's output from stdin and
# write the xml format to stdout.
#
# In order to get the raw infomation from exiftool, we need to enable the verbose
# flag (-v2) of exiftool.
#
# Usage:
#      exiftool -v2 img.jpg | ./parser.py >> output.xml
#
#

import os
import sys
import re

text = sys.stdin.read()

print """<?xml version="1.0" encoding="utf-8"?>"""
print "<exif>"

# find the following two groups of string:
#
# 1. tag:
#
# | | | x) name = value
# | | |     - Tag 0x1234
#
# 2. IFD indicator:
#
# | | | + [xxx directory with xx entries]
#
p = re.compile(
        "(((?:\| )+)[0-9]*\)(?:(?:.*? = .*?)|(?:.*? \(SubDirectory\) -->))\n.*?- Tag 0x[0-9a-f]{4})" + "|"
        + "(((?:\| )*)\+ \[.*? directory with [0-9]+ entries]$)"
        , re.M)
tags = p.findall(text)

layer = 0
ifds = []

for s in tags:
    # IFD indicator
    if s[2]:
        l = len(s[3])
        ifd = s[2][l + 3:].split()[0]
        new_layer = l / 2 + 1
        if new_layer > layer:
            ifds.append(ifd)
        else:
            for i in range(layer - new_layer):
                ifds.pop()
            ifds[-1] = ifd
        layer = new_layer
    else:
        l = len(s[1])
        s = s[0]
        new_layer = l / 2
        if new_layer < layer:
            for i in range(layer - new_layer):
                ifds.pop()
        layer = new_layer

        # find the ID
        _id = re.search("0x[0-9a-f]{4}", s)
        _id = _id.group(0)

        # find the name
        name = re.search("[0-9]*?\).*?(?:(?: = )|(?: \(SubDirectory\) -->))", s)
        name = name.group(0).split()[1]

        # find the raw value in the parenthesis
        value = re.search("\(SubDirectory\) -->", s)
        if value:
            value = "NO_VALUE"
        else:
            value = re.search("\(.*\)\n", s)
            if (name != 'Model' and value):
                value = value.group(0)[1:-2]
            else:
                value = re.search("=.*\n", s)
                value = value.group(0)[2:-1]
                if "[snip]" in value:
                    value = "NO_VALUE"

        print ('    <tag ifd="' + ifds[-1] + '" id="'
            + _id + '" name="' + name +'">' + value + "</tag>")
print "</exif>"

tests/res/raw/android_lawn.mp4

deleted100644 → 0
−1.44 MiB

File deleted.

tests/res/raw/galaxy_nexus.jpg

deleted100755 → 0
−995 KiB
Loading image diff...
Loading