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

Commit 82983750 authored by Mark Harman's avatar Mark Harman
Browse files

Don't run testTakeVideo on Android 6 emulator.

parent d8d76b56
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -90,7 +90,7 @@ public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActiv
        super("net.sourceforge.opencamera", MainActivity.class);
    }
    private static boolean isEmulator() {
    static boolean isEmulator() {
        return Build.MODEL.contains("Android SDK built for x86");
    }
+8 −1
Original line number Diff line number Diff line
package net.sourceforge.opencamera.test;

import android.os.Build;

import junit.framework.Test;
import junit.framework.TestSuite;

@@ -20,7 +22,12 @@ public class Nexus7Tests {

        // tests for testing Camera2 API with LEGACY Camera2 functionality
        suite.addTest(TestSuite.createTest(MainActivityTest.class, "testTakePhoto"));
        if( MainActivityTest.isEmulator() && Build.VERSION.SDK_INT == Build.VERSION_CODES.M ) {
            // video doesn't work on Android 6 emulator!
        }
        else {
            suite.addTest(TestSuite.createTest(MainActivityTest.class, "testTakeVideo"));
        }

        return suite;
    }